View RSS feed

JSON Server for local dev

Published: Oct 10, 2024Source
  1. Install dev dependency
npm install json-server --save-dev
  1. Add server script to package.json
{
"scripts": {
// ...
"server": "json-server -p3001 --watch db.json"
}
}
  1. Run json server
npm run server