port konfigurierbar

This commit is contained in:
ChK
2026-04-03 18:40:55 +02:00
parent a9fc78305c
commit 71d04271db
4 changed files with 97 additions and 4 deletions

View File

@@ -144,8 +144,11 @@ setTimeout(function(){
console.log("Works with FluidNc Base");
port = 2095
server.listen(port);
const port = Number(process.env.PORT);
const listenPort = Number.isInteger(port) ? port : 2095;
server.listen(listenPort);
console.log("Listen on Port: https://localhost:" + port.toString()+ "/")
@@ -192,5 +195,9 @@ const infoServer = https.createServer(httpsOptions, (req, res) => {
}
});
infoServer.listen(2098);
console.log("Info server listening on https://localhost:2098/");
const InfPort = Number(process.env.PORT);
const listenInfoPort = Number.isInteger(InfPort) ? InfPort : 2095;
infoServer.listen(listenInfoPort);
console.log("Info server listening on https://localhost:"+ listenInfoPort.toString() + "/");