This repository contains the backend code for a chat application. Follow the instructions below to set up the project on your local machine.
Make sure you have the following installed on your machine:
-
Clone the Repo
git clone https://github.com/yourusername/chat-app-backend.git
-
Navigate to the Backend Directory
cd /backend
-
Install Dependencies
npm install
-
Create a .env File Make sure to create in Root of the backend.
In the
backend
directory, create a.env
file and add the following environment variables:DATABASE_URL=your_mongodb_connection_string PORT=your_port_number ACCESS_TOKEN_SECRET=your_access_token_secret REFRESH_TOKEN_SECRET=your_refresh_token_secret TOKEN_EXPIRE=token_expiry_duration
Replace the placeholder values with your actual configuration details.
Start the development server with:
npm run dev