A simple backend for a chat-style application built using Node.js, Express, MongoDB, and EJS for rendering views. This project allows users to create, view, edit, and manage chat messages with a clean UI.
- Create new chat messages
- View all saved chats
- Edit existing messages
- Delete messages
- MongoDB integration using Mongoose
- Server-side rendering with EJS
- Custom CSS styling
Chat-App-Backend-
│
├── models
│ └── chat.js # Mongoose schema & model
│
├── styles
│ └── home.css # Main stylesheet
│
├── views
│ ├── create.ejs # Form to create chat
│ ├── edit.ejs # Form to edit chat
│ └── home.ejs # Homepage displaying all chats
│
├── index.js # Main Express application entry point
├── init.js # DB initialization script (optional)
│
├── package.json
└── package-lock.json
| Tool / Library | Purpose |
|---|---|
| Node.js | Backend runtime |
| Express.js | Web framework |
| MongoDB | Database |
| Mongoose | MongoDB ODM |
| EJS | Templating engine |
| CSS | Styling |
- Clone the repository
git clone https://github.com/CodeWithJatinSh/Chat-App-Backend-.git
cd Chat-App-Backend-- Install dependencies
npm install-
Configure MongoDB
Update your MongoDB URL insideindex.jsor use a.envfile. -
Start the server
npm start- Visit the app
👉
http://localhost:3000/
- User authentication (login/sign-up)
- Real-time chat with Socket.io
- Improved UI/UX
- Deployment & production setup
Pull requests are welcome!
Feel free to open issues for suggestions or bugs.
Made by Jatin Sohanvi (CodeWithJatinSh)
💻 Learning. Building. Growing.