This is the backend for a MERN stack application, built with Node.js, Express.js, and MongoDB. It handles multiple modules including cart, categories, chat, dispensary, notifications, orders, products, taxes, transactions, users, and user locations.
- Technologies Used
- Prerequisites
- Installation
- Environment Variables
- Running the Application
- API Documentation
- Modules Overview
- Folder Structure
- License
- Node.js
- Express.js
- MongoDB (with Mongoose ODM)
- JWT (JSON Web Tokens) for authentication
- bcrypt for password hashing
- dotenv for environment variables
- Nodemon for development
Make sure you have the following installed:
-
Clone the repository:
git clone <repository-url>
-
Navigate to the backend directory:
cd backend
-
Install dependencies:
npm install
Create a .env
file in the root directory and configure the following environment variables:
# MongoDB connection string
MONGO_URI=mongodb://localhost:27017/mydatabase
# JWT secret key
JWT_SECRET=your_jwt_secret
# Port for the server
PORT=5000