mirror of
https://github.com/typicode/json-server.git
synced 2025-08-06 15:19:25 +08:00
2.0 KiB
2.0 KiB
Change Log
[0.8.9][2016-03-17]
- CLI can now read options from
json-server.json
if present - CLI option
-c/--config
to point to a different configuration file
[0.8.8][2016-02-13]
Fixed
- Fix #233
[0.8.7][2016-01-22]
Added
gzip
compression to improve performances- CLI option
-nc/--no-cors
to disable CORS
[0.8.6][2016-01-07]
Added
- CLI option
-ro/--read-only
to allow only GET requests
[0.8.5][2015-12-28]
Fixed
- Fix #177
[0.8.4][2015-12-13]
Added
- Like operator
GET /posts?title_like=json
(accepts RegExp)
[0.8.3][2015-11-25]
Added
- CLI option
-q/--quiet
- Nested route
POST /posts/1/comments
- Not equal operator
GET /posts?id_ne=1
[0.8.2][2015-10-15]
Added
- CLI option
-S/--snapshots
to set a custom snapshots directory.
Fixed
- Fix plural resources:
DELETE
should return404
if resource doesn't exist.
[0.8.1][2015-10-06]
Fixed
- Fix plural resources:
PUT
should replace resource instead of updating properties. - Fix singular resources:
POST
,PUT
,PATCH
should not convert resource properties.
[0.8.0][2015-09-21]
Changed
jsonServer.defaults
is now a function and can take an object. If you're using the project as a module, you need to update your code:
// Before
jsonServer.defaults
// After
jsonServer.defaults()
jsonServer.defaults({ static: '/some/path'})
- Automatically ignore unknown query parameters.
# Before
GET /posts?author=typicode&foo=bar # []
# After
GET /posts?author=typicode&foo=bar # [{...}, {...}]
Added
- CLI option for setting a custom static files directory.
json-server --static some/path
[0.7.28][2015-09-09]
# Support range
GET /products?price_gte=50&price_lte=100
[0.7.27][2015-09-02]
Added
# Support OR
GET /posts?id=1&id2
GET /posts?category=javascript&category=html
[0.7.26][2015-09-01]
Added
# Support embed and expand in lists
GET /posts?embed=comments
GET /posts?expand=user