Skip to content

oreanroy/restfullApi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

restfullApi

A node and express based restful API, with monogo atlas for data storage.

Dependencies

morgan to log request.

mongoose easy connection and read write operation on mongo

multer to upload files

node brcypt to hash and salt password

End Points

POST

To add a product with the api defined body structure

http://localhost:3000/products/

To create an order in the defined body structure

http://localhost:3000/orders

To create a new user with the defined body structure

http:://localhost:300/user/signup

To login as an user, with the defined body structure

http:://localhost:300/user/signup

GET Request

Get request to get all the avialabe products

http://localhost:3000/products/

Get request to get all an individual product, substitute the product id with product id you obatin form get request to product

http://localhost:3000/products/:productId

To get all the orders

You need to login to get the orders

http://localhost:3000/orders

To get details of an individual order replace the order id(individual) with the id you obatain on geting all the product

http://localhost:3000/orders

DELETE Request

To delete a product, you need to loged in to delete an project

http://localhost:3000/products/productId

To delete an order, you should be logged in to perform this task and body

Replace the order id with the order id

http://localhost:3000/orders/orderId

To delete an user, with the body in defined format

Replace the user id with the origian user id string

http://localhost:3000/orders/orderId

PATCH Request

To change an product details, json body in the specified format. Should be logged in.

http://localhost:3000/products/productId

Citaions and copyright metions

Academind tutorial on youtube

About

A node and express based restful API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published