json-server 0.14.1 → 0.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.14.2 - 2018-12-26
4
+
5
+ * Fix `db.getState is not a function`
6
+
3
7
  ## 0.14.1 - 2018-12-25
4
8
 
5
9
  * Show error message if port is already used
package/README.md CHANGED
@@ -308,7 +308,7 @@ __Tip__ use modules like [Faker](https://github.com/Marak/faker.js), [Casual](ht
308
308
 
309
309
  ### HTTPS
310
310
 
311
- There's many way to set up SSL in development. One simple way though is to use [hotel](https://github.com/typicode/hotel).
311
+ There are many ways to set up SSL in development. One simple way is to use [hotel](https://github.com/typicode/hotel).
312
312
 
313
313
  ### Add custom routes
314
314
 
@@ -12,7 +12,7 @@ const low = require('lowdb');
12
12
 
13
13
  const Memory = require('lowdb/adapters/Memory');
14
14
 
15
- const FileAsync = require('lowdb/adapters/FileAsync');
15
+ const FileSync = require('lowdb/adapters/FileSync');
16
16
 
17
17
  const bodyParser = require('../body-parser');
18
18
 
@@ -31,7 +31,7 @@ module.exports = (db, opts = {
31
31
  _isFake: false
32
32
  }) => {
33
33
  if (typeof db === 'string') {
34
- db = low(new FileAsync(db));
34
+ db = low(new FileSync(db));
35
35
  } else if (!_.has(db, '__chain__') || !_.has(db, '__wrapped__')) {
36
36
  db = low(new Memory()).setState(db);
37
37
  } // Create router
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "json-server",
3
- "version": "0.14.1",
3
+ "version": "0.14.2",
4
4
  "description": "Serves JSON files through REST routes.",
5
5
  "main": "./lib/server/index.js",
6
6
  "bin": "./lib/cli/bin.js",