mirror of
https://github.com/typicode/json-server.git
synced 2025-07-27 20:23:34 +08:00
Add config option
This commit is contained in:
@ -26,7 +26,7 @@
|
||||
"server-destroy": "^1.0.1",
|
||||
"underscore-db": "^0.9.1",
|
||||
"update-notifier": "^0.5.0",
|
||||
"yargs": "^3.10.0"
|
||||
"yargs": "^4.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"husky": "^0.6.1",
|
||||
|
@ -8,6 +8,7 @@ module.exports = function () {
|
||||
updateNotifier({ pkg: pkg }).notify()
|
||||
|
||||
var argv = yargs
|
||||
.config('config')
|
||||
.usage('$0 [options] <source>')
|
||||
.options({
|
||||
port: {
|
||||
@ -26,7 +27,7 @@ module.exports = function () {
|
||||
},
|
||||
routes: {
|
||||
alias: 'r',
|
||||
description: 'Load routes file'
|
||||
description: 'Path to routes file'
|
||||
},
|
||||
static: {
|
||||
alias: 's',
|
||||
@ -57,6 +58,11 @@ module.exports = function () {
|
||||
quiet: {
|
||||
alias: 'q',
|
||||
description: 'Suppress log messages from output'
|
||||
},
|
||||
config: {
|
||||
alias: 'c',
|
||||
description: 'Path to config file',
|
||||
default: 'json-server.json'
|
||||
}
|
||||
})
|
||||
.boolean('watch')
|
||||
|
Reference in New Issue
Block a user