This is a Node REST API that acts as a shop service. Users must create an account and be authorized and will then get access to create products, update, delete, and fetch data based on products(contains images) and orders. The sign in token works for an hour, and then sign in is required again. In order to use all the features Postman is highly recommended.
- GET request all products with their info: https://mongo-shop-api.herokuapp.com/products
- GET request one product with a specific id: https://mongo-shop-api.herokuapp.com/products/5e7fed1422ca113690f67d06
In order to create, update, delete both products and orders(also fetch orders) then you must sign up.
-
- Change to POST request and the path should be https://mongo-shop-api.herokuapp.com/user/signup
-
- body should be a raw json and should look like this
*
{ "email": "Any real email", "password": "any password" }
- body should be a raw json and should look like this
*
-
- The will return an access token that will last one hour. This token will be then be used for all requests that need auth. In the headers create a new header called
Authorizationand the value should beBearer {Token}
- The will return an access token that will last one hour. This token will be then be used for all requests that need auth. In the headers create a new header called
For more requests and info send an email to [email protected]
- Node.js - JS runtime environment
- Express - Web Framework for Node.js
- MongoDB - NoSQL database
- Mongoose - ODM library for MongoDB and Node.js
- Heroku - Cloud Service Host
- Mustafa Abdulrahman - Primary Creator - Mustaballer
This project is licensed under the MIT License - see the LICENSE.md file for details
- Huge props to Academind as learning resources