make port changeable through env

This commit is contained in:
Darius
2025-11-18 22:23:20 +01:00
parent c7f0c38cb3
commit 99b9f7d40c
3 changed files with 12 additions and 7 deletions

View File

@@ -141,10 +141,13 @@ server.register(
{ prefix: "/api" },
);
server.listen({ port: 8080, host: "0.0.0.0" }, (err, address) => {
if (err) {
console.error(err);
process.exit(1);
}
console.log(`Server listening at ${address}`);
});
server.listen(
{ port: parseInt(Config.port, 10), host: "0.0.0.0" },
(err, address) => {
if (err) {
console.error(err);
process.exit(1);
}
console.log(`Server listening at ${address}`);
},
);