Welcome to the Blog Application! This application allows users to create, manage, and share blog posts.
The backend of this application is built using the following technologies:
- Node.js: JavaScript runtime for server-side development.
- Express: Fast, unopinionated, minimalist web framework for Node.js.
- MongoDB: NoSQL database for storing blog posts, users, and related data.
- Mongoose: MongoDB object modeling for Node.js.
- Multer: Middleware for handling file uploads.
- Sharp: High-performance image resizing library.
- JSON Web Tokens (JWT): Authentication and authorization mechanism.
- Nodemailer: Module for sending emails (used for user registration, etc.).
The Blog Application integrates with the following third-party APIs:
- Google OAuth: Used for user authentication.
- Firebase Storage: Cloud storage service for storing profile images.
-
Clone the repository:
git clone https://github.com/steve2700/Blog-Backend- cd Blog-Backend- -
Install dependencies:
npm install
-
Set up environment variables:
Create a
.envfile in the root directory with the following content:PORT=3001 MONGODB_URI=<your_mongodb_connection_uri> SECRET_KEY=<your_secret_key> CLIENT_URL=http://localhost:3000 # Replace with your client application URL GOOGLE_CLIENT_ID=<your_google_client_id> GOOGLE_CLIENT_SECRET=<your_google_client_secret> GOOGLE_CALLBACK_URL=<your_google_callback_url> EMAIL_USERNAME=<your_email_username> EMAIL_PASSWORD=<your_email_password> EMAIL_APP_PASSWORD=<your_email_app_password> FIREBASE_PROJECT_ID=<your_firebase_project_id> FIREBASE_PRIVATE_KEY=<your_firebase_private_key> FIREBASE_CLIENT_EMAIL=<your_firebase_client_email>
-
Start the server:
npm start
The server will run on port 3001.
Explore the API endpoints and learn how to integrate with the Blog Application by referring to our API Documentation.
If you would like to contribute to the development of this application, please follow our Contribution Guidelines.
This project is licensed under the MIT License - see the MIT LICENSE file for details.