Fix: take “http.host” config entry into account.
This commit is contained in:
parent
537e3b6f1f
commit
3f25d10e6f
|
@ -2,10 +2,10 @@
|
|||
http:
|
||||
# Address on which the server is listening on.
|
||||
#
|
||||
# Sets it to '*' to listen on all addresses.
|
||||
# Sets it to '0.0.0.0' to listen on all addresses.
|
||||
#
|
||||
# Default: 127.0.0.1
|
||||
#host: '*'
|
||||
#host: '0.0.0.0'
|
||||
|
||||
# Port on which the server is listening on.
|
||||
#
|
||||
|
|
|
@ -346,9 +346,10 @@ Q.ninvoke(require('fs'), 'readFile', __dirname +'/../config/local.yaml', {'encod
|
|||
console.warn('[Warn] Servers in config file are no longer supported.');
|
||||
}
|
||||
|
||||
var host = cfg.get('http', 'host');
|
||||
var port = cfg.get('http', 'port');
|
||||
http_serv = require('http').createServer().listen(port).on('listening', function () {
|
||||
console.info('XO-Server Web server is listening on port '+ port +'.');
|
||||
http_serv = require('http').createServer().listen(port, host).on('listening', function () {
|
||||
console.info('XO-Server Web server is listening on port '+ host +':'+ port +'.');
|
||||
});
|
||||
|
||||
xo.start(cfg);
|
||||
|
|
Loading…
Reference in New Issue