https://github.com/soap171/node-blog-rest-api
REST API for a blog application built using (MongoDB, Express.js, React.js, Node.js).
https://github.com/soap171/node-blog-rest-api
blog blogs express jwt mailtrap mern-stack mongodb node
Last synced: 3 months ago
JSON representation
REST API for a blog application built using (MongoDB, Express.js, React.js, Node.js).
- Host: GitHub
- URL: https://github.com/soap171/node-blog-rest-api
- Owner: Soap171
- Created: 2024-08-03T11:51:42.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-10-10T01:58:16.000Z (8 months ago)
- Last Synced: 2025-01-07T19:41:08.798Z (5 months ago)
- Topics: blog, blogs, express, jwt, mailtrap, mern-stack, mongodb, node
- Language: JavaScript
- Homepage:
- Size: 4.98 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Blog REST API
This is a REST API for a blog application built using (MongoDB, Express.js, React.js, Node.js). The API provides comprehensive endpoints for managing blog posts and user interactions, including user authentication, email verification, and password reset functionality.
## Features
- **User Authentication**: Secure user authentication using JWT (JSON Web Tokens).
- **Email Verification**: Users receive a verification email after signing up to confirm their email address.
- **Password Reset**: Users can reset their passwords by receiving a reset link via email.
- **CRUD Operations**: Full CRUD (Create, Read, Update, Delete) functionality for blog posts and comments.
- **Category Filtering**: Blog posts can be filtered by category.
- **Error Handling**: Comprehensive error handling ensures the API responds gracefully to invalid requests and server errors.
- **Comments on Posts**: Users can add comments on blog posts.## Technologies Used
- **Backend**: Node.js and Express.js
- **Database**: MongoDB
- **Authentication**: JWT (JSON Web Tokens)
- **Email Service**: Mailtrap## Installation
1. **Clone the repository**:
```bash
git clone https://github.com/yourusername/mern-blog-rest-api.git
cd mern-blog-rest-api2. **Install dependencies**:
```bash
npm install3. **Set up environment variables**
```bash
PORT='your port number'
MONGO_URL='your MongoDB URL'
JWT_SECRET='your JWT secret key'
NODE_ENV='development'
MAILTRAP_TOKEN='your Mailtrap token'
MAILTRAP_ENDPOINT='your Mailtrap endpoint'4.**Start the server**
```bash
npm start