index.js: add HOST environment argument
This commit is contained in:
parent
e9c6f3abde
commit
a01a8c6e14
7
index.js
7
index.js
@ -47,7 +47,10 @@ app.use('/static', express.static('static'));
|
||||
app.use(require('./controllers/api'));
|
||||
app.use(require('./controllers/website'));
|
||||
|
||||
let server = app.listen(process.env.PORT || 3000, function () {
|
||||
logger.log('BOOTING UP', 'Listening on port ' + (process.env.PORT || 3000));
|
||||
const bindHost = process.env.HOST || '0.0.0.0';
|
||||
const bindPort = process.env.PORT || 3000;
|
||||
|
||||
let server = app.listen(bindPort, bindHost, function () {
|
||||
logger.log('BOOTING UP', 'Listening on ' + bindHost + ':' + bindPort);
|
||||
});
|
||||
module.exports = server;
|
||||
|
Loading…
Reference in New Issue
Block a user