diff --git a/config.json.defaults b/config.json.defaults index 34b0a7ce01559bc0ebe8c382807732a738fb90d0..657c72bcab912fa5c92e2b3e24ab385813c5eee8 100644 --- a/config.json.defaults +++ b/config.json.defaults @@ -1,4 +1,6 @@ { "higherLevelDomain": "dyndns.mydomain.com", - "dbHost": "localhost" + "dbHost": "localhost", + "listenAddress": "127.0.0.1", + "listenPort": 3000 } \ No newline at end of file diff --git a/index.js b/index.js index aa62340e1bf3051e26284ab1412cfc5f7bf81db6..6f69d96cfb85b42d0aa9f136cf2c6067f464818c 100644 --- a/index.js +++ b/index.js @@ -20,8 +20,8 @@ app.get('/register', registerMW(), replyMW()); // update an existing dyndns record app.get('/update', updateMW(), replyMW()); -const server_port = 3000; -const server_domain = '0.0.0.0'; +const server_port = config.config().listenPort; +const server_domain = config.config().listenAddress; app.listen(server_port, server_domain, function () { console.log(`This server is listening on http://${server_domain}:${server_port}`); }); \ No newline at end of file