Skip to content

MUSTAFA-Hamzawy/eCommerce_api_express.js

Repository files navigation


Table Of Contents

About The Project

REST API for ecommerce using Node.js, Express.js, and MongDB.

Please read the "Getting Started" section before opening an issue.

Features

  • Authentication System ( login, logout, register )
  • CRUD operations for brands.
  • CRUD operations for Categories.
  • CRUD operations for Products.
  • Cart Logic.
  • Order Logic.
  • Search Functionality.

API Docs

Link to api docs

Built With

  • Node.js
  • Express.js
  • MongoDB | Mongoose

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

  • Node.js
  • Express.js
  • MongoDB

Installation

  1. Clone the repo
    git clone https://github.com/MUSTAFA-Hamzawy/eCommerce_api_express.js.git
  1. Make your own copy of the .env file (To set your own environmental variables).
    cp .env.example .env
 
    PORT= 3005
    CONNECTION_STRING= your db connection string
    JWT_ACCESS_TOKEN_KEY= generate it (run node in terminal --> require('crypto').randomBytes(60).toString('hex')
    JWT_REFRESH_TOKEN_KEY= generate it (run node in terminal --> require('crypto').randomBytes(60).toString('hex')
    ACCESS_TOKEN_EXPIRED_TIME  // 15m is recommended
    REFRESH_TOKEN_EXPIRED_TIME // Set duration as you like ( examples: 18h, 2d )
  1. Install dependecies
    npm install
  1. Seed Database
    npm run seed
  1. Start Running
    npm start

License

See LICENSE for more information.

Releases

No releases published

Packages

No packages published