REST API for ecommerce using Node.js, Express.js, and MongDB.
Please read the "Getting Started" section before opening an issue.
- Authentication System ( login, logout, register )
- CRUD operations for brands.
- CRUD operations for Categories.
- CRUD operations for Products.
- Cart Logic.
- Order Logic.
- Search Functionality.
- Node.js
- Express.js
- MongoDB | Mongoose
To get a local copy up and running follow these simple steps.
- Node.js
- Express.js
- MongoDB
- Clone the repo
git clone https://github.com/MUSTAFA-Hamzawy/eCommerce_api_express.js.git
- 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 )
- Install dependecies
npm install
- Seed Database
npm run seed
- Start Running
npm start
See LICENSE for more information.
- MIT License
- Copyright 2020 © Mustafa Hamzawy