File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff 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)' ,
Original file line number Diff line number Diff 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`' )
You can’t perform that action at this time.
0 commit comments