https://github.com/matthewbeckwith/restapi
This is a RESTful API built in node.js
https://github.com/matthewbeckwith/restapi
Last synced: about 2 months ago
JSON representation
This is a RESTful API built in node.js
- Host: GitHub
- URL: https://github.com/matthewbeckwith/restapi
- Owner: matthewBeckwith
- License: gpl-3.0
- Created: 2018-10-12T15:54:47.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-12T16:32:20.000Z (over 6 years ago)
- Last Synced: 2023-07-29T05:21:17.292Z (almost 2 years ago)
- Language: JavaScript
- Size: 21.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# restAPI
This is a RESTful API built in node.js and uses a mongodb.## Endpoints:
### Products = ``` localhost:3000/products/ ```
GET - Gets all products
GET /:id - Gets a specific product
POST - Creates a new Product (requires auth token)
PATCH /:id - Updates a specific product (requires auth token)
DELETE /:id - Removes a specific product from database (requires auth token)### Orders = ``` localhost:3000/orders/ ```
###### (all require the user to be authenticated with auth token)
GET - Gets all orders
GET /:id - Gets a specific order
POST - Creates a new order
DELETE /:id - Removes a specific order from database### User = ``` localhost:3000/users/ ```
POST /signup - Creates user
POST /login - Lets created user sign in and returns an auth token
DELETE /:id - Removes a user (requires auth token)