diff --git a/server.js b/server.js index e6349b6..41611cc 100644 --- a/server.js +++ b/server.js @@ -5,6 +5,7 @@ const zlib = require("zlib"); const crypto = require("crypto"); const PORT = process.env.PORT || 3000; +const HOST = process.env.HOST || "0.0.0.0"; const ROOT = __dirname; class AssetProcessor { @@ -535,8 +536,8 @@ async function start() { const server = http.createServer((req, res) => processor.handleRequest(req, res) ); - server.listen(PORT, () => { - console.log(`Server running on http://localhost:${PORT}`); + server.listen(PORT, HOST, () => { + console.log(`Server running on http://${HOST}:${PORT}`); }); }