This is a simple chat application built using Express.js, MongoDB, Node.js, and EJS templates. It allows users to engage in real-time chat sessions through a web interface.
- Node.js installed on your machine.
- MongoDB installed and running locally.
-
Clone the repository:
git clone https://github.com/your-username/simple-chat-app.git
-
Navigate to the project directory:
cd simple-chat-app -
Install dependencies using npm:
npm install
-
Ensure that your MongoDB server is running locally.
-
Update the MongoDB connection string in
app.jsto point to your local MongoDB server:mongoose.connect('mongodb://localhost:27017/simple-chat-app', { useNewUrlParser: true, useUnifiedTopology: true });
Start the application using nodemon:
nodemon app.jsVisit http://localhost:3000/chats in your browser to access the chat application.
This chat application is built as a CRUD (Create, Read, Update, Delete) example for learning REST API with MongoDB, Express, Node.js, HTML, and CSS. Follow the steps below to interact with the application:
- Open the application in your browser.
- Explore existing chats and messages.
- Create: Use the chat interface to create a new chat and send messages.
- Read: View and read existing messages and chats.
- Update: Edit and update messages or chat details.
- Delete: Remove messages or entire chats as needed.
Feel free to experiment with CRUD operations to understand how RESTful APIs work in the context of a chat application.
For any inquiries or collaborations, you can reach out to Rupesh Pingale on LinkedIn.
Feel free to contribute to the project by opening issues or submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.