forked from Hye-Ararat/Lava
/
install.ts
29 lines (26 loc) · 901 Bytes
/
install.ts
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
27
28
29
const express = require("express");
const app = express();
require("express-ws")(app);
app.ws("/install", (ws: any, req: any) => {
console.log("✅ Connection Established")
console.log("⬇️ Installing LXD...")
ws.send(JSON.stringify(
{
status: "Installing LXD...",
percent: 1,
image: "https://linuxcontainers.org/lxd/docs/latest/_images/containers.png",
}
));
setTimeout(() => {
ws.send(JSON.stringify(
{
status: "Installing LXD...",
percent: 2,
image: "https://linuxcontainers.org/lxd/docs/latest/_images/containers.png",
}
));
}, 1500)
})
app.listen(3001, () => {
console.log("✅ Hye Lava is ready to be installed. Please press next in Hye Ararat.")
})