fix: server host const

This commit is contained in:
Florian Sylvain
2026-07-04 13:53:34 +02:00
parent a8072f22c4
commit 21cf63185b
+3 -2
View File
@@ -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}`);
});
}