Added support for using `mongo:password` and `redis:password` from config, when no password is entered at setup. This allows for having "default" password and overrides from config. Added using `mongo:username` and `port` from config when running setup.

v1.18.x
ahwayakchih 10 years ago
parent f00589c8ba
commit 4c2f628baa

@ -22,12 +22,14 @@
}, },
{ {
name: 'mongo:username', name: 'mongo:username',
description: 'MongoDB username' description: 'MongoDB username',
'default': nconf.get('mongo:username') || ''
}, },
{ {
name: 'mongo:password', name: 'mongo:password',
description: 'Password of your MongoDB database', description: 'Password of your MongoDB database',
hidden: true hidden: true,
before: function(value) { value = value || nconf.get('mongo:password') || ''; return value; }
}, },
{ {
name: "mongo:database", name: "mongo:database",

@ -28,7 +28,8 @@
{ {
name: 'redis:password', name: 'redis:password',
description: 'Password of your Redis database', description: 'Password of your Redis database',
hidden: true hidden: true,
before: function(value) { value = value || nconf.get('redis:password') || ''; return value; }
}, },
{ {
name: "redis:database", name: "redis:database",

@ -47,7 +47,7 @@ questions.main = [
questions.optional = [ questions.optional = [
{ {
name: 'port', name: 'port',
default: 4567 default: nconf.get('port') || 4567
} }
]; ];

Loading…
Cancel
Save