How To Create and Deploy a json-server

json-server is a tool for creating mock REST API fast! To get started, ensure you have the following requirements: NodeJS (npm) Let’s get started! On an empty folder, initiate a nodejs application by running the following on your terminal/CMD: npm init -y Once that is complete, you install the following packages: json-server json-serve cors nodemon (as a dev dependency) npm install json-server json-serve cors npm install -D nodemon After the installation, create a new file: index.js. This is the entry point for the json-serve. Add the following inside the file: ...

October 18, 2022 · 2 min · Chris Achinga