A full stack pizza store application
-
create
.env
file containing the following values:-DATABASEURL
,JWT_SECRET
,JWT_EXPIRY
,BASE_URL
BASE_URL = "your server address"
eg:- localhost:5000 -
npm install
- to download all dependencies the application requires -
node index
- to start the server
method | url | functionality |
---|---|---|
POST |
/user/signup | register new user |
POST |
/user/login | login and get jwt token |
POST |
/user/ | modify user details |
GET |
/user/role | to get users role |
method | url | functionality |
---|---|---|
GET |
/user/cart | get users cart item |
POST |
/user/cart | add pizza item to user cart |
DELETE |
/user/cart/item | remove a particular item from the cart |
DELETE |
/user/cart | removes all item from the users cart |
POST |
/orders | move a users cart item to orders |
GET |
/orders | get all the orders user made |
GET |
/orders | get all the orders the app recieved(admin) |
method | url | functionality |
---|---|---|
GET |
/pizzas | get all pizza items |
GET |
/pizzas/:type | get all pizza items of particular category |
GET |
/pizzas/search?price=199&type=veg | get all pizza items for the search query |
POST |
/pizzas/ | add a new pizza item (admin) |
PATCH |
/pizzas/:id | update a pizza item (admin) |
DELETE |
/pizzas/:id | delete a particular pizza item (admin) |