Skip to content

Commit d04152a

Browse files
committed
Merge pull request typicode#230 from siawyoung/master
Add section under Extras about alternative ports
2 parents 7467448 + c9b7769 commit d04152a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,14 @@ json-server db.json
184184
json-server db.json --static ./static
185185
```
186186

187+
### Alternative port
188+
189+
You can start JSON Server on other ports with the `--port` flag:
190+
191+
```bash
192+
$ json-server --watch db.json --port 3004
193+
```
194+
187195
### Access from anywhere
188196

189197
You can access your fake API from anywhere using CORS and JSONP.

0 commit comments

Comments
 (0)