From 23b51591e6fc11c993dcb956999b6fa8777e254e Mon Sep 17 00:00:00 2001 From: typicode Date: Sat, 13 Jan 2024 02:51:27 +0100 Subject: [PATCH] docs: add db.json5 --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 8b3b62744..706054458 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,28 @@ Create a `db.json` (or `db.json5`) file } ``` +
+ +`db.json5` + +```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', + }, +} +``` + +
+ Pass it to JSON Server CLI ```shell