Merge branch 'iamcardinal-merge'

v1.18.x
Julian Lam 11 years ago
commit ee71c1cf0d

@ -66,6 +66,7 @@
nconf.set('upload_url', nconf.get('url') + 'uploads/');
winston.info('Initializing NodeBB v' + pkg.version + ', on port ' + nconf.get('port') + ', using Redis store at ' + nconf.get('redis:host') + ':' + nconf.get('redis:port') + '.');
winston.info('NodeBB instance bound to: ' + (nconf.get('bind_address') || 'Any address'));
if (process.env.NODE_ENV === 'development') {
winston.info('Base Configuration OK.');

@ -18,7 +18,9 @@ var async = require('async'),
}, {
name: 'port',
description: 'Port number of your NodeBB',
'default': 4567
'default': 4567,
pattern: /[0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]/,
message: 'Please enter a value betweeen 1 and 65535'
}, {
name: 'use_port',
description: 'Use a port number to access NodeBB?',
@ -40,7 +42,11 @@ var async = require('async'),
}, {
name: 'redis:password',
description: 'Password of your Redis database'
}],
}, {
name: 'bind_address',
description: 'IP or Hostname to bind to',
'default': '0.0.0.0'
}],
setup: function (callback) {
async.series([
function (next) {

@ -7,9 +7,12 @@ var utils = require('./../public/src/utils.js'),
nconf = require('nconf');
(function (Meta) {
Meta.config = {};
Meta.configs = {
init: function (callback) {
delete Meta.config;
Meta.configs.list(function (err, config) {
if (!err) {
Meta.config = config;

@ -185,7 +185,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('bind_address'));
}
app.create_route = function (url, tpl) { // to remove

Loading…
Cancel
Save