diff --git a/app.js b/app.js index 9d7a53b..a44158b 100644 --- a/app.js +++ b/app.js @@ -53,7 +53,7 @@ if(settings.general.https == true) { "cert": fs.readFileSync(settings.https.cert), "key": fs.readFileSync(settings.https.key) }; - https.createServer(httpsOptions, app).listen(settings.general.listen); + https.createServer(httpsOptions, app).listen(settings.general.listen.port, settings.general.listen.host); } else { - http.createServer(app).listen(settings.general.listen); + http.createServer(app).listen(settings.general.listen.port, settings.general.listen.host); } \ No newline at end of file diff --git a/settings.json.template b/settings.json.template index 93adbfa..5476e96 100644 --- a/settings.json.template +++ b/settings.json.template @@ -2,8 +2,11 @@ "general": { //serve https or http? //generate certs in ./snakeoil before activating this - "https": false, - "listen": 3000 + "https": false, + "listen": { + "host": "localhost", + "port": 3000 + } }, "https": { "key": "snakeoil/privkey.pem",