diff --git a/bin/lib/options.js b/bin/lib/options.js index eaf7de44f..72f3cc0da 100644 --- a/bin/lib/options.js +++ b/bin/lib/options.js @@ -52,6 +52,12 @@ module.exports = [ default: './config', prompt: true }, + { + name: 'config-file', + question: 'Path to the config file (for example: ./config.json)', + default: './config.json', + prompt: true + }, { name: 'db-path', question: 'Path to the server metadata db directory (for users/apps etc)', diff --git a/bin/lib/start.js b/bin/lib/start.js index b27a0e460..5ecd0ac7b 100644 --- a/bin/lib/start.js +++ b/bin/lib/start.js @@ -24,8 +24,9 @@ module.exports = function (program, server) { start.action((opts) => { let argv = extend({}, opts, { version: program.version() }) + let configFile = argv['configFile'] || './config.json' - fs.readFile(process.cwd() + '/config.json', (err, file) => { + fs.readFile(configFile, (err, file) => { // No file exists, not a problem if (err) { console.log(colors.cyan.bold('TIP'), 'create a config.json: `$ solid init`')