No description
Find a file
2023-06-11 13:09:27 +03:00
src README 2023-06-11 12:50:33 +03:00
.dockerignore docker 2023-06-11 01:22:34 +03:00
.env.example done with checkout + started mail 2023-06-10 01:20:42 +03:00
.gitignore generate and push are working 2023-06-08 14:05:28 +03:00
docker-compose.yaml removed unused vars 2023-06-11 01:24:50 +03:00
Dockerfile using npm to start the server 2023-06-11 01:27:51 +03:00
package-lock.json sendgrid added 2023-06-10 01:39:09 +03:00
package.json test 2023-06-11 13:01:29 +03:00
README.md README 2023-06-11 13:09:27 +03:00
tsconfig.json generate and push are working 2023-06-08 14:05:28 +03:00

Ecomm Backend

This repository contains the backend implementation for the Ecomm e-commerce application.

Description

This is a simple e-commerce backend application built with Node.js, TypeScript, Express.js, MongoDB, and Docker. It provides API endpoints to manage users and products.

Table of Contents

  • [Technologies Used]
  • [How to Run]
  • [API Documentation]
    • [Users]
      • [Create a New User]
      • [Login]
    • [Products]
      • [Get All Products]

Technologies Used

  • Node.js
  • TypeScript
  • Express.js
  • MongoDB
  • Mongoose ORM
  • Docker (docker-compose)
  • bcrypt
  • JWT

How to Run

To run the Ecomm backend application, follow these steps:

  1. Clone the repository.
  2. Ensure that you have Docker and Docker Compose installed.
  3. Implement the required environment variables by creating an .env file.
  4. Run the following command in the root directory:
    docker-compose up
    ```
    

The application will be running on port 3000, and the database will be running on port 27017.

API Documentation

Users

Create a New User - POST /users Creates a new user.

Request Body

{
  "name": "string",
  "email": "string",
  "password": "string"
}

Response Body

{
  "user": {
    "_id": "string",
    "name": "string",
    "email": "string",
    "password": "string",
    "createdAt": "string",
    "updatedAt": "string",
    "__v": "number"
  },
  "token": "string"
}