mirror of
https://github.com/typicode/json-server.git
synced 2025-07-31 14:12:38 +08:00
Merge pull request #230 from siawyoung/master
Add section under Extras about alternative ports
This commit is contained in:
@ -184,6 +184,14 @@ json-server db.json
|
|||||||
json-server db.json --static ./static
|
json-server db.json --static ./static
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Alternative port
|
||||||
|
|
||||||
|
You can start JSON Server on other ports with the `--port` flag:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ json-server --watch db.json --port 3004
|
||||||
|
```
|
||||||
|
|
||||||
### Access from anywhere
|
### Access from anywhere
|
||||||
|
|
||||||
You can access your fake API from anywhere using CORS and JSONP.
|
You can access your fake API from anywhere using CORS and JSONP.
|
||||||
|
Reference in New Issue
Block a user