Skip to content

Commit

Permalink
docs: add db.json5
Browse files Browse the repository at this point in the history
  • Loading branch information
typicode committed Jan 13, 2024
1 parent 03a3bd0 commit 23b5159
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,28 @@ Create a `db.json` (or `db.json5`) file
}
```

<details>

<summary>`db.json5`</summary>

```json5
{
posts: [
{ id: '1', title: 'a title' },
{ id: '2', title: 'another title' },
],
comments: [
{ id: '1', text: 'a comment about post 1', postId: '1' },
{ id: '2', text: 'another comment about post 1', postId: '1' },
],
profile: {
name: 'typicode',
},
}
```

</details>

Pass it to JSON Server CLI

```shell
Expand Down

0 comments on commit 23b5159

Please sign in to comment.