diff --git a/CHANGELOG.md b/CHANGELOG.md index d6655ce..552ac0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 0.14.0 - 2018-06-09 + +* Listen to `localhost` by default, instead of `0.0.0.0` + ## 0.13.0 - 2018-05-30 * Bundle all index page assets so that you access it without network connection diff --git a/README.md b/README.md index 6d6334b..168a257 100644 --- a/README.md +++ b/README.md @@ -362,7 +362,7 @@ json-server [options] Options: --config, -c Path to config file [default: "json-server.json"] --port, -p Set port [default: 3000] - --host, -H Set host [default: "0.0.0.0"] + --host, -H Set host [default: "localhost"] --watch, -w Watch file(s) [boolean] --routes, -r Path to routes file --middlewares, -m Paths to middleware files [array] diff --git a/src/cli/index.js b/src/cli/index.js index ba26c76..58e1ae8 100644 --- a/src/cli/index.js +++ b/src/cli/index.js @@ -18,7 +18,7 @@ module.exports = function() { host: { alias: 'H', description: 'Set host', - default: '0.0.0.0' + default: 'localhost' }, watch: { alias: 'w', diff --git a/src/cli/run.js b/src/cli/run.js index f21cae4..122d233 100644 --- a/src/cli/run.js +++ b/src/cli/run.js @@ -16,9 +16,7 @@ const example = { } function prettyPrint(argv, object, rules) { - const host = argv.host === '0.0.0.0' ? 'localhost' : argv.host - const port = argv.port - const root = `http://${host}:${port}` + const root = `http://${argv.host}:${argv.port}` console.log() console.log(chalk.bold(' Resources'))