Merge pull request #2778 from ahwayakchih/support-more-config-defaults-for-setup

This adds more setup defaults from config.
v1.18.x
Julian Lam 10 years ago
commit 848babcdfa

@ -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
}
];

Loading…
Cancel
Save