mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 23:15:48 +01:00
LevelDB installation questions
This commit is contained in:
@@ -76,6 +76,11 @@ var async = require('async'),
|
|||||||
description: "Which database to use",
|
description: "Which database to use",
|
||||||
'default': nconf.get('mongo:database') || 0
|
'default': nconf.get('mongo:database') || 0
|
||||||
}],
|
}],
|
||||||
|
levelQuestions : [{
|
||||||
|
name: "level:database",
|
||||||
|
description: "Enter the path to your Level database",
|
||||||
|
'default': nconf.get('level:database') || '/var/level/nodebb'
|
||||||
|
}],
|
||||||
|
|
||||||
setup: function (callback) {
|
setup: function (callback) {
|
||||||
async.series([
|
async.series([
|
||||||
@@ -159,6 +164,10 @@ var async = require('async'),
|
|||||||
password: databaseConfig['mongo:password'],
|
password: databaseConfig['mongo:password'],
|
||||||
database: databaseConfig['mongo:database']
|
database: databaseConfig['mongo:database']
|
||||||
};
|
};
|
||||||
|
} else if (config.database === 'level') {
|
||||||
|
config.level = {
|
||||||
|
database: databaseConfig['level:database']
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
return next(new Error('unknown database : ' + config.database));
|
return next(new Error('unknown database : ' + config.database));
|
||||||
}
|
}
|
||||||
@@ -211,6 +220,12 @@ var async = require('async'),
|
|||||||
} else {
|
} else {
|
||||||
prompt.get(install.mongoQuestions, dbQuestionsSuccess);
|
prompt.get(install.mongoQuestions, dbQuestionsSuccess);
|
||||||
}
|
}
|
||||||
|
} else if(config.database === 'level') {
|
||||||
|
if (config['level:database']) {
|
||||||
|
dbQuestionsSuccess(null, config);
|
||||||
|
} else {
|
||||||
|
prompt.get(install.levelQuestions, dbQuestionsSuccess);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return next(new Error('unknown database : ' + config.database));
|
return next(new Error('unknown database : ' + config.database));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user