json-server

Node.js CI

Important

Viewing alpha v1 documentation – usable but expect breaking changes. For stable version, see here

Install

npm install json-server

Usage

Create a db.json or db.json5 file

{
  "posts": [
    { "id": "1", "title": "a title", "views": 100 },
    { "id": "2", "title": "another title", "views": 200 }
  ],
  "comments": [
    { "id": "1", "text": "a comment about post 1", "postId": "1" },
    { "id": "2", "text": "another comment about post 1", "postId": "1" }
  ],
  "profile": {
    "name": "typicode"
  }
}
View db.json5 example
{
  posts: [
    { id: '1', title: 'a title', views: 100 },
    { id: '2', title: 'another title', views: 200 },
  ],
  comments: [
    { id: '1', text: 'a comment about post 1', postId: '1' },
    { id: '2', text: 'another comment about post 1', postId: '1' },
  ],
  profile: {
    name: 'typicode',
  },
}

You can read more about JSON5 format here.

Pass it to JSON Server CLI

$ npx json-server db.json

Get a REST API

$ curl http://localhost:3000/posts/1
{
  "id": "1",
  "title": "a title"
}

Run json-server --help for a list of options

Sponsors ✨

Sponsors

Become a sponsor and have your company logo here

Sponsorware

Note

This project uses the Fair Source License. Only organizations with 3+ users are kindly asked to contribute a small amount through sponsorship sponsor for usage. This license helps keep the project sustainable and healthy, benefiting everyone.

For more information, FAQs, and the rationale behind this, visit https://fair.io/.

Routes

Based on the example db.json, you'll get the following routes:

GET    /posts
GET    /posts/:id
POST   /posts
PUT    /posts/:id
PATCH  /posts/:id
DELETE /posts/:id

# Same for comments
GET   /profile
PUT   /profile
PATCH /profile

Params

Conditions

  • ==
  • lt<
  • lte<=
  • gt>
  • gte>=
  • ne!=
GET /posts?views_gt=9000

Range

  • start
  • end
  • limit
GET /posts?_start=10&_end=20
GET /posts?_start=10&_limit=10

Paginate

  • page
  • per_page (default = 10)
GET /posts?_page=1&_per_page=25

Sort

  • _sort=f1,f2
GET /posts?_sort=id,-views

Nested and array fields

  • x.y.z...
  • x.y.z[i]...
GET /foo?a.b=bar
GET /foo?x.y_lt=100
GET /foo?arr[0]=bar

Embed

GET /posts?_embed=comments
GET /comments?_embed=post

Delete

DELETE /posts/1
DELETE /posts/1?_dependent=comments

Serving static files

If you create a ./public directory, JSON Serve will serve its content in addition to the REST API.

You can also add custom directories using -s/--static option.

json-server -s ./static
json-server -s ./static -s ./node_modules

Notable differences with v0.17

  • id is always a string and will be generated for you if missing
  • use _per_page with _page instead of _limitfor pagination
  • use Chrome's Network tab > throtling to delay requests instead of --delay CLI option

typicode/json-server

{
"props": {
"initialPayload": {
"allShortcutsEnabled": false,
"path": "/",
"repo": {
"id": 14747598,
"defaultBranch": "main",
"name": "json-server",
"ownerLogin": "typicode",
"currentUserCanPush": false,
"isFork": false,
"isEmpty": false,
"createdAt": "2013-11-27T13:21:13.000Z",
"ownerAvatar": "https://avatars.githubusercontent.com/u/5502029?v=4",
"public": true,
"private": false,
"isOrgOwned": false
},
"currentUser": null,
"refInfo": {
"name": "main",
"listCacheKey": "v0:1706287166.0",
"canEdit": false,
"refType": "branch",
"currentOid": "507878a406e4910efcb8ce17ab7fa0deb78148fa"
},
"tree": {
"items": [
{
"name": ".github",
"path": ".github",
"contentType": "directory"
},
{
"name": ".husky",
"path": ".husky",
"contentType": "directory"
},
{
"name": "fixtures",
"path": "fixtures",
"contentType": "directory"
},
{
"name": "public",
"path": "public",
"contentType": "directory"
},
{
"name": "src",
"path": "src",
"contentType": "directory"
},
{
"name": "views",
"path": "views",
"contentType": "directory"
},
{
"name": ".eslintrc.json",
"path": ".eslintrc.json",
"contentType": "file"
},
{
"name": ".gitattributes",
"path": ".gitattributes",
"contentType": "file"
},
{
"name": ".gitignore",
"path": ".gitignore",
"contentType": "file"
},
{
"name": "CONTRIBUTING.md",
"path": "CONTRIBUTING.md",
"contentType": "file"
},
{
"name": "LICENSE",
"path": "LICENSE",
"contentType": "file"
},
{
"name": "README.md",
"path": "README.md",
"contentType": "file"
},
{
"name": "package-lock.json",
"path": "package-lock.json",
"contentType": "file"
},
{
"name": "package.json",
"path": "package.json",
"contentType": "file"
},
{
"name": "tsconfig.json",
"path": "tsconfig.json",
"contentType": "file"
}
],
"templateDirectorySuggestionUrl": null,
"readme": null,
"totalCount": 15,
"showBranchInfobar": false
},
"fileTree": null,
"fileTreeProcessingTime": null,
"foldersToFetch": [],
"treeExpanded": false,
"symbolsExpanded": false,
"isOverview": true,
"overview": {
"banners": {
"shouldRecommendReadme": false,
"isPersonalRepo": false,
"showUseActionBanner": false,
"actionSlug": null,
"actionId": null,
"showProtectBranchBanner": false,
"recentlyTouchedDataChannel": null,
"publishBannersInfo": {
"dismissActionNoticePath": "/settings/dismiss-notice/publish_action_from_repo",
"releasePath": "/typicode/json-server/releases/new?marketplace=true",
"showPublishActionBanner": false
},
"interactionLimitBanner": null,
"showInvitationBanner": false,
"inviterName": null
},
"codeButton": {
"contactPath": "/contact",
"isEnterprise": false,
"local": {
"protocolInfo": {
"httpAvailable": true,
"sshAvailable": null,
"httpUrl": "https://github.com/typicode/json-server.git",
"showCloneWarning": null,
"sshUrl": null,
"sshCertificatesRequired": null,
"sshCertificatesAvailable": null,
"ghCliUrl": "gh repo clone typicode/json-server",
"defaultProtocol": "http",
"newSshKeyUrl": "/settings/ssh/new",
"setProtocolPath": "/users/set_protocol"
},
"platformInfo": {
"cloneUrl": "https://desktop.github.com",
"showVisualStudioCloneButton": false,
"visualStudioCloneUrl": "https://windows.github.com",
"showXcodeCloneButton": false,
"xcodeCloneUrl": "https://developer.apple.com",
"zipballUrl": "/typicode/json-server/archive/refs/heads/main.zip"
}
},
"newCodespacePath": "/codespaces/new?hide_repo_select=true&repo=14747598"
},
"popovers": {
"rename": null,
"renamedParentRepo": null
},
"commitCount": "948",
"overviewFiles": [
{
"displayName": "README.md",
"repoName": "json-server",
"refName": "main",
"path": "README.md",
"preferredFileType": "readme",
"tabName": "README",
"richText": "<article class=\"markdown-body entry-content container-lg\" itemprop=\"text\"><h1 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-json-server\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#json-server\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>json-server</h1>\n<p dir=\"auto\"><a href=\"https://github.com/typicode/json-server/actions/workflows/node.js.yml\"><img src=\"https://github.com/typicode/json-server/actions/workflows/node.js.yml/badge.svg\" alt=\"Node.js CI\" style=\"max-width: 100%;\"></a></p>\n<div class=\"markdown-alert markdown-alert-important\" dir=\"auto\"><p class=\"markdown-alert-title\" dir=\"auto\"><svg class=\"octicon octicon-report mr-2\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\"></path></svg>Important</p><p dir=\"auto\">Viewing alpha v1 documentation – usable but expect breaking changes. For stable version, see <a href=\"https://github.com/typicode/json-server/tree/v0\">here</a></p>\n</div>\n<h2 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-install\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#install\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Install</h2>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"npm install json-server\"><pre>npm install json-server</pre></div>\n<h2 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-usage\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#usage\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Usage</h2>\n<p dir=\"auto\">Create a <code>db.json</code> or <code>db.json5</code> file</p>\n<div class=\"highlight highlight-source-json notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"{\n &quot;posts&quot;: [\n { &quot;id&quot;: &quot;1&quot;, &quot;title&quot;: &quot;a title&quot;, &quot;views&quot;: 100 },\n { &quot;id&quot;: &quot;2&quot;, &quot;title&quot;: &quot;another title&quot;, &quot;views&quot;: 200 }\n ],\n &quot;comments&quot;: [\n { &quot;id&quot;: &quot;1&quot;, &quot;text&quot;: &quot;a comment about post 1&quot;, &quot;postId&quot;: &quot;1&quot; },\n { &quot;id&quot;: &quot;2&quot;, &quot;text&quot;: &quot;another comment about post 1&quot;, &quot;postId&quot;: &quot;1&quot; }\n ],\n &quot;profile&quot;: {\n &quot;name&quot;: &quot;typicode&quot;\n }\n}\"><pre>{\n <span class=\"pl-ent\">\"posts\"</span>: [\n { <span class=\"pl-ent\">\"id\"</span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>1<span class=\"pl-pds\">\"</span></span>, <span class=\"pl-ent\">\"title\"</span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>a title<span class=\"pl-pds\">\"</span></span>, <span class=\"pl-ent\">\"views\"</span>: <span class=\"pl-c1\">100</span> },\n { <span class=\"pl-ent\">\"id\"</span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>2<span class=\"pl-pds\">\"</span></span>, <span class=\"pl-ent\">\"title\"</span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>another title<span class=\"pl-pds\">\"</span></span>, <span class=\"pl-ent\">\"views\"</span>: <span class=\"pl-c1\">200</span> }\n ],\n <span class=\"pl-ent\">\"comments\"</span>: [\n { <span class=\"pl-ent\">\"id\"</span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>1<span class=\"pl-pds\">\"</span></span>, <span class=\"pl-ent\">\"text\"</span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>a comment about post 1<span class=\"pl-pds\">\"</span></span>, <span class=\"pl-ent\">\"postId\"</span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>1<span class=\"pl-pds\">\"</span></span> },\n { <span class=\"pl-ent\">\"id\"</span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>2<span class=\"pl-pds\">\"</span></span>, <span class=\"pl-ent\">\"text\"</span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>another comment about post 1<span class=\"pl-pds\">\"</span></span>, <span class=\"pl-ent\">\"postId\"</span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>1<span class=\"pl-pds\">\"</span></span> }\n ],\n <span class=\"pl-ent\">\"profile\"</span>: {\n <span class=\"pl-ent\">\"name\"</span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>typicode<span class=\"pl-pds\">\"</span></span>\n }\n}</pre></div>\n<details>\n<summary>View db.json5 example</summary>\n<div class=\"highlight highlight-source-js notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"{\n posts: [\n { id: '1', title: 'a title', views: 100 },\n { id: '2', title: 'another title', views: 200 },\n ],\n comments: [\n { id: '1', text: 'a comment about post 1', postId: '1' },\n { id: '2', text: 'another comment about post 1', postId: '1' },\n ],\n profile: {\n name: 'typicode',\n },\n}\"><pre><span class=\"pl-kos\">{</span>\n <span class=\"pl-c1\">posts</span>: <span class=\"pl-kos\">[</span>\n <span class=\"pl-kos\">{</span> <span class=\"pl-c1\">id</span>: <span class=\"pl-s\">'1'</span><span class=\"pl-kos\">,</span> <span class=\"pl-c1\">title</span>: <span class=\"pl-s\">'a title'</span><span class=\"pl-kos\">,</span> <span class=\"pl-c1\">views</span>: <span class=\"pl-c1\">100</span> <span class=\"pl-kos\">}</span><span class=\"pl-kos\">,</span>\n <span class=\"pl-kos\">{</span> <span class=\"pl-c1\">id</span>: <span class=\"pl-s\">'2'</span><span class=\"pl-kos\">,</span> <span class=\"pl-c1\">title</span>: <span class=\"pl-s\">'another title'</span><span class=\"pl-kos\">,</span> <span class=\"pl-c1\">views</span>: <span class=\"pl-c1\">200</span> <span class=\"pl-kos\">}</span><span class=\"pl-kos\">,</span>\n <span class=\"pl-kos\">]</span><span class=\"pl-kos\">,</span>\n <span class=\"pl-c1\">comments</span>: <span class=\"pl-kos\">[</span>\n <span class=\"pl-kos\">{</span> <span class=\"pl-c1\">id</span>: <span class=\"pl-s\">'1'</span><span class=\"pl-kos\">,</span> <span class=\"pl-c1\">text</span>: <span class=\"pl-s\">'a comment about post 1'</span><span class=\"pl-kos\">,</span> <span class=\"pl-c1\">postId</span>: <span class=\"pl-s\">'1'</span> <span class=\"pl-kos\">}</span><span class=\"pl-kos\">,</span>\n <span class=\"pl-kos\">{</span> <span class=\"pl-c1\">id</span>: <span class=\"pl-s\">'2'</span><span class=\"pl-kos\">,</span> <span class=\"pl-c1\">text</span>: <span class=\"pl-s\">'another comment about post 1'</span><span class=\"pl-kos\">,</span> <span class=\"pl-c1\">postId</span>: <span class=\"pl-s\">'1'</span> <span class=\"pl-kos\">}</span><span class=\"pl-kos\">,</span>\n <span class=\"pl-kos\">]</span><span class=\"pl-kos\">,</span>\n <span class=\"pl-c1\">profile</span>: <span class=\"pl-kos\">{</span>\n <span class=\"pl-c1\">name</span>: <span class=\"pl-s\">'typicode'</span><span class=\"pl-kos\">,</span>\n <span class=\"pl-kos\">}</span><span class=\"pl-kos\">,</span>\n<span class=\"pl-kos\">}</span></pre></div>\n<p dir=\"auto\">You can read more about JSON5 format <a href=\"https://github.com/json5/json5\">here</a>.</p>\n</details>\n<p dir=\"auto\">Pass it to JSON Server CLI</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"$ npx json-server db.json\"><pre>$ npx json-server db.json</pre></div>\n<p dir=\"auto\">Get a REST API</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"$ curl http://localhost:3000/posts/1\n{\n &quot;id&quot;: &quot;1&quot;,\n &quot;title&quot;: &quot;a title&quot;\n}\"><pre>$ curl http://localhost:3000/posts/1\n{\n <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>id<span class=\"pl-pds\">\"</span></span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>1<span class=\"pl-pds\">\"</span></span>,\n <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>title<span class=\"pl-pds\">\"</span></span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>a title<span class=\"pl-pds\">\"</span></span>\n}</pre></div>\n<p dir=\"auto\">Run <code>json-server --help</code> for a list of options</p>\n<h2 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-sponsors-\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#sponsors-\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Sponsors ✨</h2>\n<table>\n<thead>\n<tr>\n<th align=\"center\">Sponsors</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td align=\"center\"><a href=\"https://mockend.com/\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/203d7e9bdda7e3b850b3b144872ca275f583a34534f7b7b036d3f4811f455f29/68747470733a2f2f6a736f6e706c616365686f6c6465722e74797069636f64652e636f6d2f6d6f636b656e642e737667\" height=\"70px\" data-canonical-src=\"https://jsonplaceholder.typicode.com/mockend.svg\" style=\"max-width: 100%;\"></a></td>\n</tr>\n<tr>\n<td align=\"center\"><a href=\"https://www.storyblok.com/\" rel=\"nofollow\"><img src=\"https://private-user-images.githubusercontent.com/5502029/287861725-c6b10674-4ada-4616-91b8-59d30046b45a.svg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDg5NDUyMTcsIm5iZiI6MTcwODk0NDkxNywicGF0aCI6Ii81NTAyMDI5LzI4Nzg2MTcyNS1jNmIxMDY3NC00YWRhLTQ2MTYtOTFiOC01OWQzMDA0NmI0NWEuc3ZnP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDIyNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDAyMjZUMTA1NTE3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDY0MWJkMmNhNTc0ZGRhZmMzMTczNGRmMWZmYmY5MWFmZTRhOTIxOTUyZDFmOTdmM2JjMTc2NjBlNWU0NDUzYyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.UUPBNo2K7WMXqk0cPdcfy5svrpHw0nz5c2i4IXnvv6M\" height=\"40px\" secured-asset-link=\"\" style=\"max-width: 100%;\"></a></td>\n</tr>\n<tr>\n<td align=\"center\"><a href=\"https://betterstack.com/\" rel=\"nofollow\"><img src=\"https://private-user-images.githubusercontent.com/5502029/294521734-44679f8f-9671-470d-b77e-26d90b90cbdc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDg5NDUyMTcsIm5iZiI6MTcwODk0NDkxNywicGF0aCI6Ii81NTAyMDI5LzI5NDUyMTczNC00NDY3OWY4Zi05NjcxLTQ3MGQtYjc3ZS0yNmQ5MGI5MGNiZGMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDIyNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDAyMjZUMTA1NTE3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NTQ0Y2I0Y2QzNDZkMGIzODM3OTU1NTViNmIxN2Y3YTA0NWFiZDNiOTI2MzEwYWE2YjdmOGE3MmY2OWEwYWU5MCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.LQpB0l8Ze4q3D6AJrvS3Tial9ITb2bTYCyXrk2BvK-g\" height=\"40px\" secured-asset-link=\"\" style=\"max-width: 100%;\"></a></td>\n</tr>\n</tbody>\n</table>\n<p dir=\"auto\"><a href=\"https://github.com/users/typicode/sponsorship\">Become a sponsor and have your company logo here</a></p>\n<h2 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-sponsorware\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#sponsorware\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Sponsorware</h2>\n<div class=\"markdown-alert markdown-alert-note\" dir=\"auto\"><p class=\"markdown-alert-title\" dir=\"auto\"><svg class=\"octicon octicon-info mr-2\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z\"></path></svg>Note</p><p dir=\"auto\">This project uses the <a href=\"https://fair.io/\" rel=\"nofollow\">Fair Source License</a>. Only organizations with 3+ users are kindly asked to contribute a small amount through sponsorship <a href=\"https://github.com/sponsors/typicode\">sponsor</a> for usage. <strong>This license helps keep the project sustainable and healthy, benefiting everyone.</strong></p>\n<p dir=\"auto\">For more information, FAQs, and the rationale behind this, visit <a href=\"https://fair.io/\" rel=\"nofollow\">https://fair.io/</a>.</p>\n</div>\n<h2 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-routes\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#routes\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Routes</h2>\n<p dir=\"auto\">Based on the example <code>db.json</code>, you'll get the following routes:</p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"GET /posts\nGET /posts/:id\nPOST /posts\nPUT /posts/:id\nPATCH /posts/:id\nDELETE /posts/:id\n\n# Same for comments\"><pre class=\"notranslate\"><code>GET /posts\nGET /posts/:id\nPOST /posts\nPUT /posts/:id\nPATCH /posts/:id\nDELETE /posts/:id\n\n# Same for comments\n</code></pre></div>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"GET /profile\nPUT /profile\nPATCH /profile\"><pre class=\"notranslate\"><code>GET /profile\nPUT /profile\nPATCH /profile\n</code></pre></div>\n<h2 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-params\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#params\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Params</h2>\n<h3 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-conditions\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#conditions\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Conditions</h3>\n<ul dir=\"auto\">\n<li><code> </code> → <code>==</code></li>\n<li><code>lt</code> → <code>&lt;</code></li>\n<li><code>lte</code> → <code>&lt;=</code></li>\n<li><code>gt</code> → <code>&gt;</code></li>\n<li><code>gte</code> → <code>&gt;=</code></li>\n<li><code>ne</code> → <code>!=</code></li>\n</ul>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"GET /posts?views_gt=9000\"><pre class=\"notranslate\"><code>GET /posts?views_gt=9000\n</code></pre></div>\n<h3 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-range\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#range\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Range</h3>\n<ul dir=\"auto\">\n<li><code>start</code></li>\n<li><code>end</code></li>\n<li><code>limit</code></li>\n</ul>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"GET /posts?_start=10&amp;_end=20\nGET /posts?_start=10&amp;_limit=10\"><pre class=\"notranslate\"><code>GET /posts?_start=10&amp;_end=20\nGET /posts?_start=10&amp;_limit=10\n</code></pre></div>\n<h3 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-paginate\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#paginate\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Paginate</h3>\n<ul dir=\"auto\">\n<li><code>page</code></li>\n<li><code>per_page</code> (default = 10)</li>\n</ul>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"GET /posts?_page=1&amp;_per_page=25\"><pre class=\"notranslate\"><code>GET /posts?_page=1&amp;_per_page=25\n</code></pre></div>\n<h3 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-sort\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#sort\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Sort</h3>\n<ul dir=\"auto\">\n<li><code>_sort=f1,f2</code></li>\n</ul>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"GET /posts?_sort=id,-views\"><pre class=\"notranslate\"><code>GET /posts?_sort=id,-views\n</code></pre></div>\n<h3 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-nested-and-array-fields\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#nested-and-array-fields\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Nested and array fields</h3>\n<ul dir=\"auto\">\n<li><code>x.y.z...</code></li>\n<li><code>x.y.z[i]...</code></li>\n</ul>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"GET /foo?a.b=bar\nGET /foo?x.y_lt=100\nGET /foo?arr[0]=bar\"><pre class=\"notranslate\"><code>GET /foo?a.b=bar\nGET /foo?x.y_lt=100\nGET /foo?arr[0]=bar\n</code></pre></div>\n<h3 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-embed\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#embed\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Embed</h3>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"GET /posts?_embed=comments\nGET /comments?_embed=post\"><pre class=\"notranslate\"><code>GET /posts?_embed=comments\nGET /comments?_embed=post\n</code></pre></div>\n<h2 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-delete\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#delete\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Delete</h2>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"DELETE /posts/1\nDELETE /posts/1?_dependent=comments\"><pre class=\"notranslate\"><code>DELETE /posts/1\nDELETE /posts/1?_dependent=comments\n</code></pre></div>\n<h2 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-serving-static-files\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#serving-static-files\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Serving static files</h2>\n<p dir=\"auto\">If you create a <code>./public</code> directory, JSON Serve will serve its content in addition to the REST API.</p>\n<p dir=\"auto\">You can also add custom directories using <code>-s/--static</code> option.</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"json-server -s ./static\njson-server -s ./static -s ./node_modules\"><pre>json-server -s ./static\njson-server -s ./static -s ./node_modules</pre></div>\n<h2 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-notable-differences-with-v017\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#notable-differences-with-v017\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Notable differences with v0.17</h2>\n<ul dir=\"auto\">\n<li><code>id</code> is always a string and will be generated for you if missing</li>\n<li>use <code>_per_page</code> with <code>_page</code> instead of <code>_limit</code>for pagination</li>\n<li>use Chrome's <code>Network tab &gt; throtling</code> to delay requests instead of <code>--delay</code> CLI option</li>\n</ul>\n</article>",
"loaded": true,
"timedOut": false,
"errorMessage": null,
"headerInfo": {
"toc": [
{
"level": 1,
"text": "json-server",
"anchor": "json-server",
"htmlText": "json-server"
},
{
"level": 2,
"text": "Install",
"anchor": "install",
"htmlText": "Install"
},
{
"level": 2,
"text": "Usage",
"anchor": "usage",
"htmlText": "Usage"
},
{
"level": 2,
"text": "Sponsors ✨",
"anchor": "sponsors-",
"htmlText": "Sponsors ✨"
},
{
"level": 2,
"text": "Sponsorware",
"anchor": "sponsorware",
"htmlText": "Sponsorware"
},
{
"level": 2,
"text": "Routes",
"anchor": "routes",
"htmlText": "Routes"
},
{
"level": 2,
"text": "Params",
"anchor": "params",
"htmlText": "Params"
},
{
"level": 3,
"text": "Conditions",
"anchor": "conditions",
"htmlText": "Conditions"
},
{
"level": 3,
"text": "Range",
"anchor": "range",
"htmlText": "Range"
},
{
"level": 3,
"text": "Paginate",
"anchor": "paginate",
"htmlText": "Paginate"
},
{
"level": 3,
"text": "Sort",
"anchor": "sort",
"htmlText": "Sort"
},
{
"level": 3,
"text": "Nested and array fields",
"anchor": "nested-and-array-fields",
"htmlText": "Nested and array fields"
},
{
"level": 3,
"text": "Embed",
"anchor": "embed",
"htmlText": "Embed"
},
{
"level": 2,
"text": "Delete",
"anchor": "delete",
"htmlText": "Delete"
},
{
"level": 2,
"text": "Serving static files",
"anchor": "serving-static-files",
"htmlText": "Serving static files"
},
{
"level": 2,
"text": "Notable differences with v0.17",
"anchor": "notable-differences-with-v017",
"htmlText": "Notable differences with v0.17"
}
],
"siteNavLoginPath": "/login?return_to=https%3A%2F%2Fgithub.com%2Ftypicode%2Fjson-server"
}
},
{
"displayName": "LICENSE",
"repoName": "json-server",
"refName": "main",
"path": "LICENSE",
"preferredFileType": "license",
"tabName": "License",
"richText": null,
"loaded": false,
"timedOut": false,
"errorMessage": null,
"headerInfo": {
"toc": null,
"siteNavLoginPath": "/login?return_to=https%3A%2F%2Fgithub.com%2Ftypicode%2Fjson-server"
}
}
],
"overviewFilesProcessingTime": 22.374027
}
},
"appPayload": {
"helpUrl": "https://docs.github.com",
"findFileWorkerPath": "/assets-cdn/worker/find-file-worker-32bb159cc57c.js",
"findInFileWorkerPath": "/assets-cdn/worker/find-in-file-worker-c6704d501c10.js",
"githubDevUrl": null,
"enabled_features": {
"code_nav_ui_events": false,
"copilot_conversational_ux": false,
"copilot_conversational_ux_embedding_update": false,
"copilot_popover_file_editor_header": false,
"copilot_smell_icebreaker_ux": true,
"copilot_workspace": false,
"codeview_firefox_inert": true
}
}
}
}
{
"accept-ranges": "bytes",
"cache-control": "max-age=0, private, must-revalidate",
"content-encoding": "gzip",
"content-security-policy": "default-src 'none'; base-uri 'self'; child-src github.com/assets-cdn/worker/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com api.githubcopilot.com objects-origin.githubusercontent.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.com/assets-cdn/worker/ gist.github.com/assets-cdn/worker/",
"content-type": "text/html; charset=utf-8",
"date": "Mon, 26 Feb 2024 10:55:17 GMT",
"etag": "1157ece13c8a81f64759a942abe34632",
"referrer-policy": "no-referrer-when-downgrade",
"server": "GitHub.com",
"set-cookie": "logged_in=no; Path=/; Domain=github.com; Expires=Wed, 26 Feb 2025 10:55:16 GMT; HttpOnly; Secure; SameSite=Lax",
"strict-transport-security": "max-age=31536000; includeSubdomains; preload",
"transfer-encoding": "chunked",
"vary": "X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, Accept-Encoding, Accept, X-Requested-With",
"x-content-type-options": "nosniff",
"x-frame-options": "deny",
"x-github-request-id": "9978:7C05:2DBE1EF:40F7DB9:65DC6E14",
"x-xss-protection": "0"
}