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 }