https://github.com/simran1002/s3-post-tags-api
https://github.com/simran1002/s3-post-tags-api
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/simran1002/s3-post-tags-api
- Owner: simran1002
- Created: 2025-08-09T15:18:46.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-08-09T15:26:24.000Z (10 months ago)
- Last Synced: 2025-08-09T17:29:52.877Z (10 months ago)
- Language: JavaScript
- Size: 68.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Blog API
A RESTful API for managing blog posts with tags and image upload functionality built with Node.js, Express, MongoDB, and AWS S3.
## Installation
1. **Clone the repository**
```bash
git clone https://github.com/simran1002/s3-post-tags-api.git
cd blog-api
```
2. **Install dependencies**
```bash
npm install
```
3. **Start the server**
```bash
npm run dev
```
## API Documentation
Once the server is running, you can access the interactive API documentation at:
```
http://localhost:3000/api-docs
```
## API Endpoints
### Tags
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/api/tags` | Get all tags with pagination |
| POST | `/api/tags` | Create a new tag |
| GET | `/api/tags/:id` | Get a specific tag |
| PUT | `/api/tags/:id` | Update a tag |
| DELETE | `/api/tags/:id` | Delete a tag |
### Posts
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/api/posts` | Get all posts with filtering, sorting, and pagination |
| POST | `/api/posts` | Create a new post (with image upload) |
| GET | `/api/posts/:id` | Get a specific post |
| PUT | `/api/posts/:id` | Update a post |
| DELETE | `/api/posts/:id` | Delete a post |
| GET | `/api/posts/search?q=keyword` | Search posts by keywords |
| GET | `/api/posts/by-tag/:tagId` | Get posts by tag |