diff --git a/index.js b/index.js index 94371e2..d5d3853 100644 --- a/index.js +++ b/index.js @@ -12,6 +12,7 @@ const http = require("http"), var app = express(), server = http.createServer(app), + pathToClient = process.argv[2], gameServer; // Logger.enable(); @@ -29,7 +30,7 @@ gameServer.define(Config.getGameRoomName(), StarGazerRoom); app.use(Config.getSocialRoute(), socialRoutes); app.use(Config.getMonitorRoute(), monitor(gameServer)); // Prrobably shoud be set after game server is created -app.use(Config.getGameRoute(), express.static(Config.getGamePath(), { +app.use(Config.getGameRoute(), express.static(pathToClient, { maxAge: 100 })); diff --git a/package.json b/package.json index 8de2d31..b29dd27 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "npm init template for bootstraping an empty Colyseus project", "main": "index.js", "scripts": { - "start": "node index.js", + "start": "node index.js ../StarGazerClient/build", "loadtest": "colyseus-loadtest loadtest/example.js --room my_room --numClients 2", "test": "echo \"Error: no test specified\" && exit 1" },