https://github.com/osama-mohamed/shop_api_express
https://www.linkedin.com/in/osama-mohamed-ms/
https://github.com/osama-mohamed/shop_api_express
jwt jwt-auth jwt-authentication jwt-token mongodb mongoose node node-js nodejs token token-authetication
Last synced: about 2 months ago
JSON representation
https://www.linkedin.com/in/osama-mohamed-ms/
- Host: GitHub
- URL: https://github.com/osama-mohamed/shop_api_express
- Owner: osama-mohamed
- License: mit
- Created: 2018-10-03T16:59:05.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-10-13T08:57:23.000Z (over 2 years ago)
- Last Synced: 2025-03-17T13:13:14.698Z (about 1 year ago)
- Topics: jwt, jwt-auth, jwt-authentication, jwt-token, mongodb, mongoose, node, node-js, nodejs, token, token-authetication
- Language: JavaScript
- Homepage:
- Size: 33.2 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Shop API Express By Express, Mongoose.
[
]()
[
]()
## Shop API Express website contains:
* User register
* User login
* Delete User
* Show all products
* Create new product with img
* Show product detail
* Update product
* Delete product
* Show all orders
* Create new order
* Show order detail
* Delete order
* Token (JWT) valid for one hour
* Route protection
## Usage :
### Run project by :
``` javascript
# run
1. npm i
2. npm start
```
That's it.
## Done :
Now the project is running at `http://localhost:3000` and your routes is:
| Route | HTTP Method | Description |
|:-----------------------------------------------------------|:----------------|:---------------------------------------------|
| {host}/api/users/signup | POST | User register |
| {host}/api/users/login | POST | User login |
| {host}/api/users/{userId} | DELETE | Delete User |
| {host}/api/products | GET | Show all products |
| {host}/api/products | POST | Create new product with img |
| {host}/api/products/{productId} | GET | Show product detail |
| {host}/api/products/{productId} | PATCH | Update product |
| {host}/api/products/{productId} | DELETE | Delete product |
| {host}/api/orders | GET | Show all orders |
| {host}/api/orders | POST | Create new order |
| {host}/api/orders/{orderId} | GET | Show order detail |
| {host}/api/orders/{orderId} | DELETE | Delete order |
For detailed explanation on how project work, read the [Node Docs](https://nodejs.org/en/docs/), [Express Docs](http://expressjs.com/en/guide/routing.html) and [MongoDB Docs](https://docs.mongodb.com/)
## Developer
This project made by [Osama Mohamed](https://www.linkedin.com/in/osama-mohamed-ms/)
## License
This project is licensed under the [MIT License](https://opensource.org/licenses/MIT)