mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 02:16:29 +02:00
Adds hostname support, fixes #343
Works from previous testing but I haven't tried this personal revision of the code. Take it with a grain of salt.
This commit is contained in:
@@ -40,7 +40,17 @@ var async = require('async'),
|
||||
}, {
|
||||
name: 'redis:password',
|
||||
description: 'Password of your Redis database'
|
||||
}],
|
||||
}, {
|
||||
name: 'use_ip',
|
||||
description: 'Do you want to bind to an IP or hostname?',
|
||||
'default': 'n',
|
||||
pattern: /y[es]*|n[o]?/,
|
||||
message: 'Please enter \'yes\' or \'no\'',
|
||||
}, {
|
||||
name: 'hostname_ip',
|
||||
decription: 'Hostname or IP to bind to'
|
||||
'default': '0.0.0.0'
|
||||
}],
|
||||
setup: function (callback) {
|
||||
async.series([
|
||||
function (next) {
|
||||
|
||||
@@ -134,7 +134,7 @@ var express = require('express'),
|
||||
templates['logout'] = parsedTemplate;
|
||||
});
|
||||
|
||||
server.listen(nconf.get('PORT') || nconf.get('port'));
|
||||
server.listen(nconf.get('PORT') || nconf.get('port'), nconf.get('use_ip') ? nconf.get('hostname_set') : '0.0.0.0');
|
||||
}
|
||||
|
||||
auth.initialize(app);
|
||||
|
||||
Reference in New Issue
Block a user