Employee ReSTAPI that allows users to POST, DELETE, UPDATE, GET to a local store.
1.Find a directory to store the project. 2.Within the directory Clone this repo:
git clone https://github.com/logi12345/RestAPI
Make sure you have the following tools installed.
node.js
postman
nodemon
You can use node to start the applicartion
node app.js
You can use nodemon to continue working on your project while the server is running without connecting and disconnecting.
To install globally to your path.
npm install -g nodemon
To install it localy for your project.
npm install --save-dev nodemon
nodemon app.js
Once the server is running(default port 5000) use postman to test HTTPS requests.
Available requests:
GET
(All employees)
https://localhost:5000/api/v1/employees
(Single employee)
https://localhost:5000/api/v1/employee/{id}
PUT
https://localhost:5000/api/v1/employee/update/{id}
POST
https://localhost:5000/api/v1/create
DELETE
https://localhost:5000/api/v1/employee/delete/{id}