diff --git a/package.json b/package.json index ec36405..3bb96db 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/cli/index.js b/src/cli/index.js index cc45d43..0ef083e 100644 --- a/src/cli/index.js +++ b/src/cli/index.js @@ -8,6 +8,7 @@ module.exports = function () { updateNotifier({ pkg: pkg }).notify() var argv = yargs + .config('config') .usage('$0 [options] ') .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')