Server: listen to localhost by default
This commit is contained in:
parent
9ce9945b2b
commit
378e7f6d14
|
@ -28,6 +28,8 @@
|
|||
"use strict";
|
||||
|
||||
const port = parseInt(process.env.TRIVABBLE_PORT || "3000");
|
||||
const host = process.env.TRIVABBLE_HOST || "localhost"
|
||||
|
||||
const SAVE_TIMEOUT = 5000;
|
||||
const KEEP_ALIVE = 30000;
|
||||
const GAMES_BACKUP = process.env.TRIVABBLE_GAMES_BACKUP || "games.backup.json";
|
||||
|
@ -1187,7 +1189,7 @@ fs.readFile(GAMES_BACKUP, function (err, data) {
|
|||
console.error("An error happened in the HTTP server", error);
|
||||
});
|
||||
|
||||
server.listen(port, function() {
|
||||
server.listen(port, host, function() {
|
||||
console.log("Server listening on: http://localhost:%s", port);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue