Skip to content

priyadarshiniravi/mock-rest-api-employee

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mock-rest-api-employee

This is a mock server for employee look-up created using https://github.com/typicode/json-server

#Running the app

  • Install json-server npm install -g json-server
  • To start the server json-server --watch db.json
  • Staffs enpoints for the data is exposed
{
    "id": 1,
    "location": "Pune",
    "name": "Priya",
    "role": "DEV",
    "skill-set": [
      {
        "name": "Android",
        "Rating": 5
      },
      {
        "name": "Java",
        "Rating": 5
      }
    ],
    "travel-preference": {
      "Domestic": false,
      "International": false
    }
  }

Few Examples:

#Running the app with fake data

  • To generate lot of fake data faker is used
  • staff.js uses faker to generate data
  • to start server with fake data run - json-server staffs.js