json-server
Advanced tools
Comparing version 0.13.0 to 0.14.0
@@ -13,3 +13,3 @@ module.exports = { | ||
}, | ||
env: { mocha: true } | ||
env: { jest: true } | ||
} |
# 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 | ||
@@ -4,0 +8,0 @@ |
@@ -20,3 +20,3 @@ 'use strict'; | ||
description: 'Set host', | ||
default: '0.0.0.0' | ||
default: 'localhost' | ||
}, | ||
@@ -23,0 +23,0 @@ watch: { |
@@ -21,5 +21,3 @@ 'use strict'; | ||
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}`; | ||
@@ -26,0 +24,0 @@ console.log(); |
{ | ||
"name": "json-server", | ||
"version": "0.13.0", | ||
"version": "0.14.0", | ||
"description": "Serves JSON files through REST routes.", | ||
@@ -11,5 +11,3 @@ "main": "./lib/server/index.js", | ||
"scripts": { | ||
"test": "npm run test:cli && npm run test:server && npm run lint", | ||
"test:cli": "npm run build && cross-env NODE_ENV=test mocha test/cli/*.js", | ||
"test:server": "cross-env NODE_ENV=test mocha test/server/*.js", | ||
"test": "npm run build && cross-env NODE_ENV=test jest && npm run lint", | ||
"start": "run-p start:**", | ||
@@ -22,4 +20,3 @@ "start:babel-node": "babel-node src/cli/bin db.json -r routes.json", | ||
"toc": "markdown-toc -i README.md", | ||
"prepublishOnly": "npm test && npm run build && pkg-ok", | ||
"precommit": "npm test" | ||
"prepublishOnly": "npm test && npm run build && pkg-ok" | ||
}, | ||
@@ -73,3 +70,4 @@ "dependencies": { | ||
"html-webpack-plugin": "^3.2.0", | ||
"husky": "^0.14.3", | ||
"husky": "^1.0.0-rc.8", | ||
"jest": "^23.1.0", | ||
"markdown-toc": "^1.2.0", | ||
@@ -79,3 +77,2 @@ "milligram": "^1.3.0", | ||
"mkdirp": "^0.5.1", | ||
"mocha": "^4.1.0", | ||
"npm-run-all": "^4.1.3", | ||
@@ -124,3 +121,8 @@ "os-tmpdir": "^1.0.1", | ||
"node": ">=6" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "npm test" | ||
} | ||
} | ||
} |
@@ -365,3 +365,3 @@ # JSON Server [![](https://travis-ci.org/typicode/json-server.svg?branch=master)](https://travis-ci.org/typicode/json-server) [![](https://badge.fury.io/js/json-server.svg)](http://badge.fury.io/js/json-server) | ||
--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] | ||
@@ -368,0 +368,0 @@ --routes, -r Path to routes file |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
95517
1087