https://github.com/vertikajain/node-rest-api
100 days of Code Challenge! REST APIs using Vanilla NodeJS. Reusable Repo for any collection of items.
https://github.com/vertikajain/node-rest-api
json nodejs rest-api
Last synced: 5 months ago
JSON representation
100 days of Code Challenge! REST APIs using Vanilla NodeJS. Reusable Repo for any collection of items.
- Host: GitHub
- URL: https://github.com/vertikajain/node-rest-api
- Owner: VertikaJain
- Created: 2020-10-29T11:02:43.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-30T04:37:29.000Z (about 5 years ago)
- Last Synced: 2025-08-16T16:02:31.684Z (5 months ago)
- Topics: json, nodejs, rest-api
- Language: JavaScript
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vanilla NodeJS REST API
- REST APIs functionality using Vanilla NodeJS (without the easier option - Express)
- Since we cannot use `req.body` like in case of Express, I have used `req.on()` and `req.end()` events.
- Use of Regular Expressions and split() to detect type of method to be used from the URL.
- DB functionalities done using array built-in methods:
- find()
- push()
- findIndex()
- filter()
- Utility file for updating DB (json file in this project) using fs.writeFileSync().
## Status Codes
- 200 is for OK
- 201 is for Create
- 300 is for Redirect
- 400 is Bad Request
- 404 is Not Found
- 500 is for Server Errors
## HTTP Methods used
- GET
- POST
- PUT
- DELETE
## 3rd Party Libraries
- nodemon
- uuid