-
-
Notifications
You must be signed in to change notification settings - Fork 58
/
app.js
26 lines (21 loc) · 706 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const fs = require("fs");
const path = require("path");
const { safeTerminal } = require("./backend/utilities/terminal");
const port = 3230;
async function app() {
console.clear();
const BACKEND = path.resolve(__dirname + "/backend/");
const NODE_MODULES = BACKEND + "/node_modules";
if (!fs.existsSync(NODE_MODULES)) {
console.log(
"🚀 Please wait while we install all the dependencies for you...\n"
);
await safeTerminal.installModules(BACKEND);
console.log("🎉 All dependencies added successfully!");
}
setTimeout(() => {
console.log(`✨ Visit http://localhost:${port} to use Docker Web GUI`);
}, 1500);
await safeTerminal.serve(BACKEND);
}
app();