mirror of
https://github.com/Floriansylvain/compact-portfolio.git
synced 2026-08-19 11:43:19 +02:00
fix: server host const
This commit is contained in:
@@ -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}`);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user