Skip to content

General-Workspace/simple-ecommerce-product-listing-backend

Repository files navigation

Simple Ecommerce API

This is a simple Ecommerce API that allows you to create, read, update and delete products and orders in addition to creating and logging in users.

Technologies

  • Node.js
  • Express.js
  • MongoDB
  • Mongoose
  • JWT
  • Bcrypt
  • Typescript
  • Cloudinary
  • Multer

Installation

Clone the repository

git clone git@github.com:General-Workspace/simple-ecommerce-product-listing-frontend.git

Install dependencies

yarn install # or npm install

Start the development server

yarn dev # or npm run dev

Build the project

yarn build # or npm run build

Start the production server

yarn start # or npm start

API Endpoints (Users)

  • POST /api/v1/auth/signup
  • POST /api/v1/auth/login

API Endpoints (Products)

  • GET /api/v1/products
  • POST /api/v1/products
  • GET /api/v1/products/:id
  • PUT /api/v1/products/:id
  • DELETE /api/v1/products/:id

Usage

  • Create a user by making a POST request to /api/v1/auth/signup

Request

{
  "username": "john_doe",
  "email": "test@test.com",
  "password": "password"
}
  • Login a user by making a POST request to /api/v1/auth/login

Request

{
  "email": "test@test.com",
  "password": "password"
}
  • Create a product by making a POST request to /api/v1/products

Request

{
  "name": "Product 1",
  "description": "This is a product",
  "price": 1000
}

Releases

No releases published

Packages

No packages published