listen on host

This commit is contained in:
Evert Prants 2021-02-22 20:28:35 +02:00
parent c7ce387685
commit 38214f9d8a
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
2 changed files with 6 additions and 3 deletions

View File

@ -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)

View File

@ -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()