/community-app-backend

chat application

Primary LanguageJavaScriptMIT LicenseMIT

community-app

a basic chatting application.

Tech Stack 🔧

Architecture

structure

Initial DB Schema

db Schema

Prerequisites

Before setting up the Community App, ensure that you have the following prerequisites installed:

  • Node.js (version 14 or above)
  • MongoDB

Installation

Follow the steps below to set up the Community App:

1. Clone the repository:

git clone https://github.com/Codepire/community-app-backend.git

2. Navigate to the project directory:

cd community-app-backend

3. Install with:

npm install

4. Configure environment variables:

  • Create a .env file in the root directory.
  • Add the following variables to the .env file:
JWT_SEED=aslkjfa;sldfjk
TOKEN_EXPIRATION_TIME=1h

For Windows:

  • Use a text editor to create the .env file and add the variables mentioned above.
  • Save the file with the name .env in the root directory.

For Linux:

  • Open the terminal and navigate to the project directory.
  • Use the following command to create the .env file and open it in the terminal-based text editor:
nano .env
  • Add the variables mentioned above to the opened file.
  • Save the file by pressing Ctrl + O and then exit the editor by pressing Ctrl + X.

5. Start the server:

npm start