Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/divyansh956/blogapp-backend

It allows users to create posts, comment on posts, like posts, and unlike posts.
https://github.com/divyansh956/blogapp-backend

expressjs mongodb postman

Last synced: about 1 month ago
JSON representation

It allows users to create posts, comment on posts, like posts, and unlike posts.

Awesome Lists containing this project

README

        

# BlogApp with Express.js and MongoDB

BlogApp is a web application built with Express.js and MongoDB that allows users to create posts, comment on posts, like posts, and unlike posts. This README provides an overview of the features and how to use the API endpoints.

## Prerequisites

Make sure you have the following installed:

- [Node.js](https://nodejs.org/)
- [MongoDB](https://www.mongodb.com/)
- [Postman](https://www.postman.com/) (for testing the API endpoints)

## Getting Started

1. **Clone the repository**

```bash
git clone
cd BlogApp-Express-MongoDB
```

2. **Install Dependencies**

```bash
npm install
```

3. **Configure MongoDB**

- Make sure your MongoDB server is up and running.
- Update the MongoDB connection URL in `config.js` file if necessary.

4. **Start the Application**

```bash
npm start
```

The app will be running at `http://localhost:3000`.

## API Endpoints

#### 1. **Create a Post**
#### 2. **Get All Posts**
#### 3. **Create a Comment**
#### 4. **Like a Post**
#### 5. **Unlike a Post**

## Sample Requests (using Postman)
https://documenter.getpostman.com/view/30282786/2s9YXfcivP

## Technologies Used

- **Express.js:** Web framework for Node.js.
- **MongoDB:** NoSQL database for storing blog data.
- **Mongoose:** MongoDB object modeling for Node.js.
- **Body-parser:** Node.js body parsing middleware.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.