diff --git a/app.js b/app.js index ef113e5ece..1299cfdf4a 100644 --- a/app.js +++ b/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'), diff --git a/src/database/mongo.js b/src/database/mongo.js index f0c45cbc12..be473e616c 100644 --- a/src/database/mongo.js +++ b/src/database/mongo.js @@ -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", diff --git a/src/database/redis.js b/src/database/redis.js index 716a8fd715..8e06ce837a 100644 --- a/src/database/redis.js +++ b/src/database/redis.js @@ -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", diff --git a/src/install.js b/src/install.js index be1c322267..c3fa0cb94f 100644 --- a/src/install.js +++ b/src/install.js @@ -47,7 +47,7 @@ questions.main = [ questions.optional = [ { name: 'port', - default: 4567 + default: nconf.get('port') || 4567 } ];