Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/atkaridarshan04/blog-backend
A backend for a blogging application, developed with Node.js and Express.js. This API supports user authentication with JWT, enables full CRUD operations for blog posts and comments, and utilizes MySQL with Sequelize for database management with featuring middleware for security and logging.
https://github.com/atkaridarshan04/blog-backend
cloudinary express mysql nodejs sequelize
Last synced: about 1 month ago
JSON representation
A backend for a blogging application, developed with Node.js and Express.js. This API supports user authentication with JWT, enables full CRUD operations for blog posts and comments, and utilizes MySQL with Sequelize for database management with featuring middleware for security and logging.
- Host: GitHub
- URL: https://github.com/atkaridarshan04/blog-backend
- Owner: atkaridarshan04
- License: apache-2.0
- Created: 2024-09-11T10:36:02.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-07T15:11:17.000Z (3 months ago)
- Last Synced: 2024-10-17T02:04:56.781Z (3 months ago)
- Topics: cloudinary, express, mysql, nodejs, sequelize
- Language: JavaScript
- Homepage: https://documenter.getpostman.com/view/38192013/2sAXqmAjzy
- Size: 62.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Blog Backend
Welcome to the Blog Backend repository! This project provides the backend API for a blogging platform, including user authentication, post management, comments, and more. The application is built using Node.js, MySQL, and Sequelize, with features to handle image uploads via Cloudinary.
## Features
- **User Management**: Registration, login, profile management, and password updates.
- **Post Management**: Create, update, delete, and retrieve posts with support for tags.
- **Comments**: Add, update, and delete comments on posts.
- **Likes**: Like and unlike posts.
- **Followers**: Follow and unfollow users.
- **Image Uploads**: Profile pictures and post images handled via Cloudinary.
- **Tag Management**: Create, update, delete, and retrieve tags for posts.## Getting Started
### Prerequisites
- Node.js
- MySQL
- Cloudinary account (for image uploads)### Installation
1. Clone the repository:
```bash
git clone https://github.com/atkaridarshan04/Blog-Backend.git
cd Blog-Backend
```2. Install dependencies:
```bash
npm install
```3. ### Set up your environment variables:
Create a `.env` file in the root directory and configure the following environment variables:
```plaintext
MYSQL_HOST=your_database_host
MYSQL_USER=your_database_user
MYSQL_PASSWORD=your_database_passwordPORT=your_server_port
ACCESS_TOKEN_SECRET=your_access_token_secret
ACCESS_TOKEN_EXPIRY=your_access_token_expiryREFRESH_TOKEN_SECRET=your_refresh_token_secret
REFRESH_TOKEN_EXPIRY=your_refresh_token_expiryCLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
```4. Run database migrations:
```bash
npx sequelize-cli db:migrate
```5. Start the server:
```bash
npm start
```## API Documentation
The API documentation is available through Postman. You can find the link to the documentation [[here](https://documenter.getpostman.com/view/38192013/2sAXqmAjzy)].