https://github.com/kamleshchandnani/express-restapi
Rest API server using ExpressJS
https://github.com/kamleshchandnani/express-restapi
Last synced: 29 days ago
JSON representation
Rest API server using ExpressJS
- Host: GitHub
- URL: https://github.com/kamleshchandnani/express-restapi
- Owner: kamleshchandnani
- Created: 2016-10-11T17:38:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-10-12T18:17:10.000Z (over 8 years ago)
- Last Synced: 2025-03-26T20:56:58.432Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# express-restapi
Steps to run the application
`npm install`
`npm start`
You can hit the below URL using any REST client
`http://localhost:3000/employee`
The application uses following package
`body-parser` For parsing the parameters in request body
`morgan` For logging purpose
The API's demonstrates 4 different request methods GET, POST, PUT, DELETE
1. GET: Get all the employee info
2. POST: Pass the body param in following format
{ "name":"John", "age":"30" }
3. PUT: Update all the employee information
4. Delete: Delete all the employee informationThe API also supports query param
`http://localhost:3000/employee/{employeeId}`
All the above methods works the same way