npm install
to install all dependenciesnpm run server
to start the servernpm run dev
to start the app in development mode
Endpoints for backend
GET /api/users
to get all usersGET /api/users/:id
to get a user by idPOST /api/users/register
to create a new userPOST /api/users/login
to login a user and get tokenPATCH /api/users/update/:id
to update a user by idDELETE /api/users/delete/:id
to delete a user by id
GET /api/products/all
to get all productsGET /api/products/men
to get all mens productsGET /api/products/women
to get all womens productsGET /api/products/all/:id
to get a product by idPOST /api/products/all/create
to create a new productPATCH /api/products/all/update/:id
to update a product by idDELETE /api/products/all/delete/:id
to delete a product by id
GET /api/orders
only admin can access this routePOST /api/orders/create
to create a new orderAuthentication required
Authentication required
for all cart routesGET /api/cart
to get all cart items of userGET /api/cart/admin
to get all cart items of all userGET /api/cart/:id
to get a cart item by idPOST /api/cart/create
to create a new cart itemPATCH /api/cart/update/:id
to update a cart item by idDELETE /api/cart/delete/:id
to delete a cart item by id
git clone <url>
to clone the repogit branch <branch-name>
to create a new branchgit checkout <branch-name>
to switch to a branchgit checkout -b <branch-name>
to create a new branch and switch to itgit add .
to add all filesgit commit -m "<message>"
to commit changesgit push origin <branch-name>
to push changes to githubgit pull origin <branch-name>
to pull changes from githubgit branch
to list all branchesgit branch -d <branch-name>
to delete a branchgit merge <branch-name>
to merge a branch to current branchgit status
to check the status of the repo
admin@gmail.com
Admin Emailadmin1432
Admin Password