Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: typicode/json-server
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.17.0
Choose a base ref
...
head repository: typicode/json-server
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.17.1
Choose a head ref
  • 15 commits
  • 4 files changed
  • 5 contributors

Commits on Sep 2, 2021

  1. Update README.md

    typicode authored Sep 2, 2021
    Copy the full SHA
    7d8de6d View commit details

Commits on Sep 8, 2021

  1. Update README.md

    typicode authored Sep 8, 2021
    Copy the full SHA
    38e9e84 View commit details

Commits on Sep 23, 2021

  1. Update README.md

    typicode authored Sep 23, 2021
    Copy the full SHA
    718e7fc View commit details

Commits on Oct 6, 2021

  1. Update README.md

    typicode authored Oct 6, 2021
    Copy the full SHA
    766826e View commit details

Commits on Oct 14, 2021

  1. Update README.md

    typicode authored Oct 14, 2021
    Copy the full SHA
    25164fe View commit details

Commits on Nov 9, 2021

  1. Update README.md

    typicode authored Nov 9, 2021
    Copy the full SHA
    0c11c65 View commit details

Commits on Feb 2, 2022

  1. Bump nanoid from 3.1.23 to 3.1.31 (#1297)

    Bumps [nanoid](https://github.com/ai/nanoid) from 3.1.23 to 3.1.31.
    - [Release notes](https://github.com/ai/nanoid/releases)
    - [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
    - [Commits](ai/nanoid@3.1.23...3.1.31)
    
    ---
    updated-dependencies:
    - dependency-name: nanoid
      dependency-type: direct:production
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 2, 2022
    Copy the full SHA
    5e74f99 View commit details
  2. Bump tmpl from 1.0.4 to 1.0.5 (#1300)

    Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
    - [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
    - [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)
    
    ---
    updated-dependencies:
    - dependency-name: tmpl
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 2, 2022
    Copy the full SHA
    5f71c09 View commit details

Commits on Feb 5, 2022

  1. README: added documentation for router options (#1290)

    There was no documentation regarding adding router options when using
    json-server as a module. This adds just enough documentation to
    hopefully get you started.
    
    Co-authored-by: Sebastian <sebbe@sebbetop.local>
    trumtomte and Sebastian authored Feb 5, 2022
    Copy the full SHA
    bd4693d View commit details

Commits on Feb 17, 2022

  1. Update README.md

    typicode authored Feb 17, 2022
    Copy the full SHA
    1759c98 View commit details

Commits on Mar 31, 2022

  1. Update README.md

    typicode committed Mar 31, 2022
    Copy the full SHA
    0d0b5a9 View commit details

Commits on May 3, 2022

  1. Update README.md

    typicode authored May 3, 2022
    Copy the full SHA
    57af386 View commit details

Commits on Oct 7, 2022

  1. Update README.md

    typicode authored Oct 7, 2022
    Copy the full SHA
    04248d1 View commit details

Commits on Nov 3, 2022

  1. Copy the full SHA
    bd3fa55 View commit details
  2. 0.17.1

    typicode committed Nov 3, 2022
    Copy the full SHA
    5df482b View commit details
Showing with 85 additions and 1,122 deletions.
  1. +15 −15 README.md
  2. +69 −1,102 package-lock.json
  3. +1 −2 package.json
  4. +0 −3 src/cli/index.js
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ Created with <3 for front-end developers who need a quick back-end for prototypi
See also:
* :dog: [husky - Git hooks made easy](https://github.com/typicode/husky)
* :owl: [lowdb - local JSON database](https://github.com/typicode/lowdb)
* :x: :heavy_check_mark: [xv - the most minimalist test runner](https://github.com/typicode/xv)
* [xv - a beautifully simple and capable test runner](https://github.com/typicode/xv)

<p>&nbsp;</p>

@@ -36,28 +36,24 @@ See also:
<p>&nbsp;</p>

<p align="center">
<a href="https://www.deta.sh/?ref=typicode" target="_blank">
<img src="https://jsonplaceholder.typicode.com/deta.svg" height="70px">
</a>
</p>

<p>&nbsp;</p>

<p align="center">
<a href="https://uibakery.io/?utm_source=json_server&utm_medium=sponsor&utm_campaign=github" target="_blank">
<img src="https://jsonplaceholder.typicode.com/ui_bakery.jpg" height="70px">
<a href="https://megafamous.com/buy-instagram-followers" target="_blank">
<img src="https://jsonplaceholder.typicode.com/megafamous.png" height="70px">
</a>
</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

---
<h2 align="center">Silver sponsors 🥈</h2>

From generating an API to importing a CSV into postgres, Retool’s range of 20+ developer utilities is a go-to resource when building apps. [Check it out now](https://retool.com/utilities/)
<p>&nbsp;</p>

---
<p align="center">
<a href="https://cased.com" target="_blank">
<img src="https://user-images.githubusercontent.com/5502029/194441951-b7dca49d-efd6-496d-900b-288004717f11.png" height="55px">
</a>
</p>

<p>&nbsp;</p>

@@ -482,6 +478,8 @@ const router = jsonServer.router(path.join(__dirname, 'db.json'))

For an in-memory database, simply pass an object to `jsonServer.router()`.

To add custom options (eg. `foreginKeySuffix`) pass in an object as the second argument to `jsonServer.router('db.json', { foreginKeySuffix: '_id' })`.

Please note also that `jsonServer.router()` can be used in existing Express projects.

#### Custom routes example
@@ -603,10 +601,12 @@ Returns middlewares used by JSON Server.
* `noCors` disable CORS (default: false)
* `readOnly` accept only GET requests (default: false)

__`jsonServer.router([path|object])`__
__`jsonServer.router([path|object], [options])`__

Returns JSON Server router.

* options (see [CLI usage](#cli-usage))

### Deployment

You can deploy JSON Server. For example, [JSONPlaceholder](http://jsonplaceholder.typicode.com) is an online fake API powered by JSON Server and running on Heroku.
Loading
Oops, something went wrong.