A simple backend server for an e-commerce site. See Live demo.
- Public
- GET
/
- GET
/api/products
- GET
/api/products/search?title='test'
- POST
/api/user/signup
- POST
/api/user/signin
- GET
- Private
- GET
/api/products/wishlist
- PATCH
api/wishlist/add
- DELETE
api/wishlist/remove
- GET
- On your system, you should have
node
(v16.14.0 lts) andnpm
(v8.3.1) installed. Installnode
andnpm
if you don't already have them.
git clone https://github.com/akib22/assignment-backend.git
cd assignment-backend
npm i
- Copy the
.env.example
file and paste it into root in project directory as.env
. - Open the
.env
file and set theMONGODB_URL
,JWT_SECRET
.
- Run the project
npm start
- Run the project in development node
npm run dev
npm run test
- In watch mode
npm run test:watch
npm run lint
npm run lint:fix