Skip to content

Commit 95d92e8

Browse files
Eric Prud'hommeauxtimbl
authored andcommitted
+ argv: config-file (./config.json) (#613)
1 parent c311a17 commit 95d92e8

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

bin/lib/options.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ module.exports = [
5252
default: './config',
5353
prompt: true
5454
},
55+
{
56+
name: 'config-file',
57+
question: 'Path to the config file (for example: ./config.json)',
58+
default: './config.json',
59+
prompt: true
60+
},
5561
{
5662
name: 'db-path',
5763
question: 'Path to the server metadata db directory (for users/apps etc)',

bin/lib/start.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ module.exports = function (program, server) {
2424

2525
start.action((opts) => {
2626
let argv = extend({}, opts, { version: program.version() })
27+
let configFile = argv['configFile'] || './config.json'
2728

28-
fs.readFile(process.cwd() + '/config.json', (err, file) => {
29+
fs.readFile(configFile, (err, file) => {
2930
// No file exists, not a problem
3031
if (err) {
3132
console.log(colors.cyan.bold('TIP'), 'create a config.json: `$ solid init`')

0 commit comments

Comments
 (0)