How to create dummy API's
1) Install NodeJS
Download link: [Link]
Set Environment variable:
2) Check node & npm versions ( npm comes along with [Link])
3) install json-server
npm install -g json-server
Ignore this
4) create [Link] file with the following data
{
"students": [
{
"id": 1,
"name": "John",
"location": "india",
"phone": "1234567890",
"courses": [
"Java",
"Selenium"
]
},
{
"id": 2,
"name": "Kim",
"location": "US",
"phone": "98876543213",
"courses": [
"Python",
"Appium"
]
},
{
"id": 3,
"name": "Smith",
"location": "Canada",
"phone": "165498765",
"courses": [
"C#",
"RestAPI"
]
}
]
}
5) Run the below command to make your API's up and running.
json-server --watch [Link]
[Link]