Real-time text-based chat app using MongoDB, Express.js, React.js, Node.js, Socket.io,JSON Web Tokens (JWT)
- Real-time messaging
- User authentication
- Group chat
- Private chat
- Emoji Support
- Integrate canvas
- Customize user profile
- Clone the repo
- Navigate to the directory
- Install dependencies
npm install
- Set up environment variable
-
Create a
.env
file in client and server -
Define the following variables in client .env
REACT_APP_BASE_URL=http://localhost:3001
REACT_APP_fetchURL=http://localhost:3001/room
REACT_APP_SIGNUP_URL = http://localhost:3001/auth/signup
REACT_APP_LOGIN_URL = http://localhost:3001/auth/login
-
Define the following variables in server .env
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
-
- Start the server
npm run both
to run both client and server simultaneously