Skip to content

mahelika/simple-CRUD-chatApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chat App

A simple CRUD application. This app allows users to create, edit, and delete chat messages. It provides basic CRUD functionality for chat messages, and the app stores data in a MongoDB database.

Features

  • Create a new chat: Allows users to send messages to a recipient.
  • Edit a chat: Modify the content of any existing chat message.
  • Delete a chat: Remove any chat message from the database.
  • View all chats: Displays a list of all chat messages.

Technologies Used

  • MongoDB: Database for storing chat data.
  • Express.js: Backend web framework.
  • Node.js: JavaScript runtime for server-side programming.
  • EJS: Templating engine for rendering HTML views.
  • Method Override: For handling HTTP methods like PUT and DELETE in forms.

Installation

Prerequisites

Ensure you have Node.js and MongoDB installed on your machine.

Clone the repository

git clone https://github.com/username/repository-name.git

Navigate into the project folder

cd repository-name

Install dependencies

npm install

(Optional) If you haven't set up MongoDB locally, you might want to install and run it. If you are using a cloud MongoDB, make sure to update the connection string in your code. Ensure MongoDB is running or use your cloud MongoDB connection URL

Start the application

npm start

The app should now be accessible at http://localhost:8080

Routes

  • GET /chats: Display all chats.
  • GET /chats/new: Display a form to create a new chat.
  • POST /chats: Create a new chat and save it to the database.
  • GET /chats/:id/edit: Display a form to edit a specific chat message.
  • PUT /chats/:id: Update a specific chat message.
  • DELETE /chats/:id: Delete a specific chat message.

About

simple CRUD application.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published