From 579ea0dd543bf96fd32fb797f9bf5d17c8534819 Mon Sep 17 00:00:00 2001 From: Mystikfluu Date: Fri, 17 Jun 2022 20:08:03 +0200 Subject: [PATCH] add ports to server config --- server.js | 4 ++-- server_config.json | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 9bbfbb0..e727d57 100644 --- a/server.js +++ b/server.js @@ -899,7 +899,7 @@ router.post("/login",async function(req,res) { app.use(router) const httpServer = http.createServer(app); -httpServer.listen(25567); +httpServer.listen(config["ports"]["http"]); const privateKey = fs.readFileSync(config["ssl"]["privateKey"]).toString() const certificate = fs.readFileSync(config["ssl"]["certificate"]).toString() @@ -907,7 +907,7 @@ const certificate = fs.readFileSync(config["ssl"]["certificate"]).toString() const credentials = {key: privateKey, cert: certificate}; const httpsServer = https.createServer(credentials, app); -httpsServer.listen(25566); +httpsServer.listen(config["ports"]["https"]); const wss = new WebSocket({ server: httpsServer, diff --git a/server_config.json b/server_config.json index ddf7c8c..8c7f90e 100644 --- a/server_config.json +++ b/server_config.json @@ -28,5 +28,9 @@ "privateKey": "/etc/letsencrypt/live/ipost.tk/privkey.pem", "certificate" : "/etc/letsencrypt/live/ipost.tk/cert.pem" }, + "ports": { + "http": 80, + "https": 443 + }, "disallow_proxies_by_headers": true }