Skip to content

jaskin21/chat-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

Chat App


Requirements


Installation

Client

For Client (or Frontend), just run

npm cd client
npm install

Server

For Server (or Backend), just run

npm cd server
npm install

Run Project

Once the dependencies are installed:

Client

For Frontend, just run:

cd client
npm run start

Server

For Backend, just run:

cd server
npm run dev

Environment

Each Project has their own specific environment variables, just go to their specific directory and add .env (dot env) file or copy the .env.example file and edit their values.

Server

For the Backend:

ENV VARIABLE DESCRIPTION TYPE REQUIRED DEFAULT VALUE
DB_CONNECTION For Mongo DB, usual database string NO mongodb://localhost:27017
DB_NAME For Mongo DB, the database string YES Any
PORT The Port of the number NO 5000
TOKEN_EXPIRES_IN When will the Token expires string | number YES N/A
TOKEN_SECRET The Token Secret for string YES N/A

Note: for DB_CONNECTION it is better to configure and connect your own Mongo Db with user credentials

Client

For the Frontend:

ENV VARIABLE DESCRIPTION TYPE REQUIRED DEFAULT VALUE

Linter

This is make your code consistent by using ESLint.

Before you commit your changes, just make sure to run the linter first

Just run run:

pnpm run --dir (client|server) lint

If you wanted to fix automatically, just run:

pnpm run --dir (client|server) lint:fix

Make sure to change the value of --dir flag

⚠️ However, NOT all codes are fixable, but the linter will give you hint to fix it


Created by Renz Jaskin Agmata

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published