images/
.DS_Store
.gitattributes
.gitignore
LICENSE.md
README.md
db.json
package.json
server.js
yarn.lock
- Clone the Repository
- Install the Dependencies
- Run the Project
You can clone the repo or download the zip file.
To clone:
git clone https://github.com/KSAURAVSINGH/json-server-deploy.git
There is only one dependency we need to install - json-server
Install json-server
yarn add json-server
json-server --watch db.json
You should see a file named db.json created in the folder. When you run the server locally, it tries to search for the file (db.json) and if not found, it creates a file on its own with mock JSON data.
It’ll run your server locally on http://localhost:3500
To change the PORT, go to server.js file and change the port number mentioned there.
Name | Version |
---|---|
json-server | ^0.17.0 |