https://github.com/mustafa-hamzawy/ecommerce_api_express.js
REST API endpoints for e-commerce
https://github.com/mustafa-hamzawy/ecommerce_api_express.js
ecommerce expressjs mongodb mongoose nodejs rest-api
Last synced: 3 months ago
JSON representation
REST API endpoints for e-commerce
- Host: GitHub
- URL: https://github.com/mustafa-hamzawy/ecommerce_api_express.js
- Owner: MUSTAFA-Hamzawy
- License: mit
- Created: 2023-07-26T17:54:39.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-04T16:57:14.000Z (almost 3 years ago)
- Last Synced: 2025-02-13T05:19:15.798Z (over 1 year ago)
- Topics: ecommerce, expressjs, mongodb, mongoose, nodejs, rest-api
- Language: JavaScript
- Homepage:
- Size: 69.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Table Of Contents
- [About The Project](#about-the-project)
- [Features](#features)
- [API Docs](#api-docs)
- [Built With](#built-with)
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [License](#license)
## 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
```sh
git clone https://github.com/MUSTAFA-Hamzawy/eCommerce_api_express.js.git
```
2. Make your own copy of the .env file (To set your own environmental variables).
```sh
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 )
```
3. Install dependecies
```sh
npm install
```
4. Seed Database
```sh
npm run seed
```
5. Start Running
```sh
npm start
```
## License
See [LICENSE](https://github.com/MUSTAFA-Hamzawy/eCommerce_api_express.js/blob/main/LICENSE) for more information.
- MIT License
- Copyright 2020 © [Mustafa Hamzawy](https://github.com/MUSTAFA-Hamzawy)