Use APP_PORT consistently
This commit is contained in:
@@ -3,7 +3,7 @@ const fs = require("fs");
|
||||
const http = require("http");
|
||||
const path = require("path");
|
||||
|
||||
const port = Number(process.env.PORT || 3000);
|
||||
const appPort = Number(process.env.APP_PORT || 8787);
|
||||
const root = __dirname;
|
||||
const clients = new Map();
|
||||
const rooms = new Map();
|
||||
@@ -286,6 +286,6 @@ function encodeFrame(message) {
|
||||
return Buffer.concat([header, payload]);
|
||||
}
|
||||
|
||||
server.listen(port, () => {
|
||||
console.log(`Tictactics multiplayer server running at http://localhost:${port}`);
|
||||
server.listen(appPort, () => {
|
||||
console.log(`Tictactics multiplayer server running at http://localhost:${appPort}`);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user