mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
Merge pull request #2778 from ahwayakchih/support-more-config-defaults-for-setup
This adds more setup defaults from config.
This commit is contained in:
2
app.js
2
app.js
@@ -21,7 +21,7 @@
|
||||
/*global require, global, process*/
|
||||
|
||||
var nconf = require('nconf');
|
||||
nconf.argv().env();
|
||||
nconf.argv().env('__');
|
||||
|
||||
var fs = require('fs'),
|
||||
os = require('os'),
|
||||
|
||||
@@ -22,12 +22,14 @@
|
||||
},
|
||||
{
|
||||
name: 'mongo:username',
|
||||
description: 'MongoDB username'
|
||||
description: 'MongoDB username',
|
||||
'default': nconf.get('mongo:username') || ''
|
||||
},
|
||||
{
|
||||
name: 'mongo:password',
|
||||
description: 'Password of your MongoDB database',
|
||||
hidden: true
|
||||
hidden: true,
|
||||
before: function(value) { value = value || nconf.get('mongo:password') || ''; return value; }
|
||||
},
|
||||
{
|
||||
name: "mongo:database",
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
{
|
||||
name: 'redis:password',
|
||||
description: 'Password of your Redis database',
|
||||
hidden: true
|
||||
hidden: true,
|
||||
before: function(value) { value = value || nconf.get('redis:password') || ''; return value; }
|
||||
},
|
||||
{
|
||||
name: "redis:database",
|
||||
|
||||
@@ -47,7 +47,7 @@ questions.main = [
|
||||
questions.optional = [
|
||||
{
|
||||
name: 'port',
|
||||
default: 4567
|
||||
default: nconf.get('port') || 4567
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user