diff --git a/config.example.toml b/config.example.toml index 6054b6f..893a0b5 100644 --- a/config.example.toml +++ b/config.example.toml @@ -1,7 +1,9 @@ # Server configuration [server] - # Port the server will run on + # Port the server will listen on port=8282 + # Hostname the server will listen on + host="localhost" # Session key session_key="Session" # Session secret (keep this a secret) diff --git a/server/server.js b/server/server.js index 7f4671c..7fc78eb 100644 --- a/server/server.js +++ b/server/server.js @@ -91,8 +91,9 @@ module.exports = (args) => { app.use(routes) - app.listen(args.port, () => { - console.log('Listening on 0.0.0.0:' + args.port) + const host = args.host || 'localhost' + app.listen(args.port, host, () => { + console.log('Listening on %s:%s', host, args.port) // Initialize the email transporter (if configured) initEmail()