Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/divyansh956/blogapp-backend
- Owner: divyansh956
- License: mit
- Created: 2023-11-07T00:45:08.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-13T16:30:01.000Z (about 1 year ago)
- Last Synced: 2023-11-14T15:01:44.786Z (about 1 year ago)
- Topics: expressjs, mongodb, postman
- Language: JavaScript
- Homepage:
- Size: 33.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.