GitHub - akib22/assignment-backend

Overview

A simple backend server for an e-commerce site. See Live demo.

Available routes

  • Public
    • GET /
    • GET /api/products
    • GET /api/products/search?title='test'
    • POST /api/user/signup
    • POST /api/user/signin
  • Private
    • GET /api/products/wishlist
    • PATCH api/wishlist/add
    • DELETE api/wishlist/remove

Project setup

Prerequisites

  • On your system, you should have node (v16.14.0 lts) and npm (v8.3.1) installed. Install node and npm if you don't already have them.

Clone the project

git clone https://github.com/akib22/assignment-backend.git

cd assignment-backend

Install dependencies

Setup environment variables

  • Copy the .env.example file and paste it into root in project directory as .env.
  • Open the .env file and set the MONGODB_URL, JWT_SECRET.

Run the project

  • Run the project
  • Run the project in development node

Run tests

  • In watch mode

See linting warnings and errors

Fix linting warnings and errors