Skip to content

Commit 23b5159

Browse files
committed
docs: add db.json5
1 parent 03a3bd0 commit 23b5159

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,28 @@ Create a `db.json` (or `db.json5`) file
3131
}
3232
```
3333

34+
<details>
35+
36+
<summary>`db.json5`</summary>
37+
38+
```json5
39+
{
40+
posts: [
41+
{ id: '1', title: 'a title' },
42+
{ id: '2', title: 'another title' },
43+
],
44+
comments: [
45+
{ id: '1', text: 'a comment about post 1', postId: '1' },
46+
{ id: '2', text: 'another comment about post 1', postId: '1' },
47+
],
48+
profile: {
49+
name: 'typicode',
50+
},
51+
}
52+
```
53+
54+
</details>
55+
3456
Pass it to JSON Server CLI
3557

3658
```shell

0 commit comments

Comments
 (0)