This is a simple ChatApp built using Node.js.
This Node.js script implements a real-time chat application using Socket.IO. Here's a breakdown of its functionality:
- Dependencies: The script utilizes Express, HTTP, and Socket.IO.
- Server Initialization: It creates an Express server with Socket.IO attached.
- Socket Connection: Listens for new socket connections and handles events.
- User Management: Manages user joining, leaving, and tracking users in rooms.
- Messaging: Handles sending and receiving messages, including profanity filtering.
- Private Messaging: Allows users to send private messages to each other.
- Location Sharing: Supports sharing location data with other users.
- Typing Indicators: Implements typing indicators to notify other users.
- Server Startup: The server listens on a specified port and logs its status upon startup.
For detailed code explanation, refer to the provided server script.
To run the application locally, follow these steps:
-
Clone the repository:
git clone [https://github.com/your-username/chatapp.git](https://github.com/dxtaner/chatApp-nodejs)
-
Navigate to the project directory:
cd chatApp-nodejs
-
Install dependencies:
npm install
-
Start the server:
npm start
-
Open your web browser and navigate to
http://localhost:3042
to access the ChatApp.
- Node.js
- Express
- Socket.IO
- Bad Words (for profanity filtering)
- dotenv (for environment variables)
Contributions are welcome! Please fork the repository and submit a pull request.
This project is licensed under the terms of the MIT license. See the LICENSE file for details.
- Repository: [GitHub](https://github.com/dxtaner/chatApp-nodejs/)