|
|
|
@ -6,6 +6,7 @@ const express = require("express");
|
|
|
|
|
|
|
|
|
|
const PORT = process.env.PORT || 3000;
|
|
|
|
|
const PREFIX = process.env.PREFIX || "";
|
|
|
|
|
const PUBLIC = process.env.PUBLIC || "";
|
|
|
|
|
|
|
|
|
|
const router = express.Router();
|
|
|
|
|
const routes = (app) => {
|
|
|
|
@ -20,7 +21,7 @@ const routes = (app) => {
|
|
|
|
|
|
|
|
|
|
const server = express()
|
|
|
|
|
.use(PREFIX, routes(router, {}))
|
|
|
|
|
.use(express.static("public"))
|
|
|
|
|
.use(PUBLIC, express.static("public"))
|
|
|
|
|
.listen(PORT, () => console.log(`Listening on ${PORT}`));
|
|
|
|
|
|
|
|
|
|
const wss = new WebSocketServer({ server, clientTracking: true });
|
|
|
|
|