Fake Rest API in 30 sec
You read it right!

Can you set up a fake rest API in seconds without code?
If your answer is no then this would come in handy.
You just need to have NodeJS and a JSON structure to set up
the fake rest API.
- Open your terminal / CMD / Powershell then enter
npm install -g json-server
then press enter. - Now open a new folder somewhere then open the folder in
your code editor. - Create a file called
db.json
. - Open that file and make your JSON structure.
- open terminal / CMD / PowerShell in that folder and type
json-server — watch db.json
and hit enter.
Your fake rest API is ready.
Note: If you want to have the fake rest API to be accessible by all the
devices in your wifi network.
Open your terminal / CMD type ipconfig
for windows and ifconfig
for Linux. find out your IPV4 address assigned to your device by your router.
then run the command json-server — watch db.json --host <IPV4> --port 5000
There is more for you to explore over here.
Hope you liked it, feel free to ask your queries I am happy to answer them.
Github if you want to follow.