mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-07 22:45:46 +01:00
Merge branch 'iamcardinal-merge'
This commit is contained in:
1
app.js
1
app.js
@@ -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,6 +42,10 @@ 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([
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user