Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

ChitChat - An Express and MongoDB Chat Application

This is a simple chat application built using Express.js and MongoDB.

Getting Started

These instructions will help you set up the project on your local machine for development and testing purposes.

Prerequisites

  • Node.js
  • MongoDB

Installing

  1. Clone the repository:

    git clone <repository-url>
  2. Navigate to the project directory:

    cd express_mongoDB
  3. Install the dependencies:

    npm install

Running the Application

  1. Start MongoDB: Make sure MongoDB is running on your system. You can start it using the following command (assuming MongoDB is installed as a service):

    mongod
  2. Start the application:

    npm start

    or if you are using nodemon for development:

    nodemon
  3. Access the application: The server will start on port 8080. You can access it at http://localhost:8080.

Application Routes

  • GET /chats: Fetch and display all chats.
  • GET /chats/new: Display the form to create a new chat.
  • POST /chats: Create a new chat.
  • GET /chats/:id/edit: Display the form to edit a chat.
  • PUT /chats/:id: Update an existing chat.
  • GET /: Basic route to test the server.

File Structure

express_mongoDB/ │

├── models/

│ └── chat.js # Chat model schema

├── public/

│ └── ... # Static files (CSS, JS, etc.)

├── views/

│ ├── edit.ejs # View for editing a chat

│ ├── newChat.ejs # View for creating a new chat

│ └── showAll.ejs # View for displaying all chats

├── index.js # Main server file

├── package.json # Project metadata and dependencies

└── README.md # This README file

Built With

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests.

Authors

Acknowledgments

  • Hat tip to anyone whose code was used

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages