Skip to content

Commit 4be7538

Browse files
committed
Update README.md
1 parent a42373e commit 4be7538

File tree

1 file changed

+51
-2
lines changed

1 file changed

+51
-2
lines changed

README.md

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,57 @@ Created with <3 for front-end developers who need a quick back-end for prototypi
88
* [JSONPlaceholder - Live running version](http://jsonplaceholder.typicode.com)
99

1010
See also:
11-
* :hotel: [hotel - Get local domains in seconds](https://github.com/typicode/hotel)
11+
* :hotel: [hotel - Start apps from your browser and get local dev domains in seconds](https://github.com/typicode/hotel)
1212
* :dog: [husky - Git hooks made easy](https://github.com/typicode/husky)
1313

14+
## Table of contents
15+
16+
<details>
17+
18+
<!-- toc -->
19+
20+
- [Example](#example)
21+
- [Install](#install)
22+
- [Routes](#routes)
23+
* [Plural routes](#plural-routes)
24+
* [Singular routes](#singular-routes)
25+
* [Filter](#filter)
26+
* [Paginate](#paginate)
27+
* [Sort](#sort)
28+
* [Slice](#slice)
29+
* [Operators](#operators)
30+
* [Full-text search](#full-text-search)
31+
* [Relationships](#relationships)
32+
* [Database](#database)
33+
* [Homepage](#homepage)
34+
- [Extras](#extras)
35+
* [Static file server](#static-file-server)
36+
* [Alternative port](#alternative-port)
37+
* [Access from anywhere](#access-from-anywhere)
38+
* [Remote schema](#remote-schema)
39+
* [Generate random data](#generate-random-data)
40+
* [HTTPS](#https)
41+
* [Add custom routes](#add-custom-routes)
42+
* [Add middlewares](#add-middlewares)
43+
* [CLI usage](#cli-usage)
44+
* [Module](#module)
45+
+ [Simple example](#simple-example)
46+
+ [Custom routes example](#custom-routes-example)
47+
+ [Access control example](#access-control-example)
48+
+ [Custom output example](#custom-output-example)
49+
+ [Rewriter example](#rewriter-example)
50+
+ [Mounting JSON Server on another endpoint example](#mounting-json-server-on-another-endpoint-example)
51+
* [Deployment](#deployment)
52+
- [Links](#links)
53+
* [Video](#video)
54+
* [Articles](#articles)
55+
* [Third-party tools](#third-party-tools)
56+
- [License](#license)
57+
58+
<!-- tocstop -->
59+
60+
</details>
61+
1462
## Example
1563

1664
Create a `db.json` file
@@ -39,7 +87,8 @@ Now if you go to [http://localhost:3000/posts/1](), you'll get
3987
{ "id": 1, "title": "json-server", "author": "typicode" }
4088
```
4189

42-
Also when doing requests, its good to know that
90+
Also when doing requests, it's good to know that:
91+
4392
- If you make POST, PUT, PATCH or DELETE requests, changes will be automatically and safely saved to `db.json` using [lowdb](https://github.com/typicode/lowdb).
4493
- Your request body JSON should be object enclosed, just like the GET output. (for example `{"name": "Foobar"}`)
4594
- Id values are not mutable. Any `id` value in the body of your PUT or PATCH request wil be ignored. Only a value set in a POST request wil be respected, but only if not already taken.

0 commit comments

Comments
 (0)