json-server icon indicating copy to clipboard operation
json-server copied to clipboard

Get a full fake REST API with zero coding in less than 30 seconds (seriously)

Results 291 json-server issues
Sort by recently updated
recently updated
newest added

{ "api_host" : "The hostname of your API server. You may also specify the port.", "api_host" : "hodorhodor.com", "retry_interval" : "The interval in seconds between retrying failed API calls", "retry_interval"...

I attempted to put default params in case the actual requests do not have `_limit`. Here is the following code ```javascript // node server.js const jsonServer = require('json-server'); const server...

```JavaScript GET /electronics?id=1&id=2 ``` When I tried to use filter based on this filter json-server did not response correctly. ```json [ { "id": "1", "model": "samsung", "realPrice": "1128", "bonusPrice": "99.50",...

### Adds support for getting nested resources using a foreign key There was previous support for nested resources in the previous version which I found helpful, I also found this...

Implemented Server Side Events at a new `/events` endpoint (might be nicer to be able to specify the endpoint in the CLI), which allows clients to listen to changes of...

Would be nice if the json-server would offer [server-send-events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) when data gets created, modified or deleted. Front-ends then could use [EventSource](https://developer.mozilla.org/en-US/docs/Web/API/EventSource) to get notified and can react on the changes.

This PR adds server-sent events support to json-server

``` npx json-server .\db.json5 --routes .\routes.json Unknown option '--routes' Usage: json-server [options] Options: -p, --port Port (default: 3000) -h, --host Host (default: localhost) -s, --static Static files directory (multiple allowed)...

``` npx json-server --watch data/db.json --port 3500 ``` ``` $ npx json-server --watch data/db.json --port 3500 --watch/-w can be omitted, JSON Server 1+ watches for file changes by default JSON...

Hello, I'm trying to setup routing using `routes.json`, which doesn't appear to be working correctly. ### Expected behaviour: Calling `/projects/1?_embed=offers` returns the following JSON: ```JS { "id": 1, "name": "Villa...