This is a MERN (MongoDB, Express.js, React, Node.js) stack-based blog application that allows users to create, read, update, and delete blog posts. The project is divided into two main folders - "client" for the frontend and "api" for the backend.
- React: A JavaScript library for building user interfaces.
- React Router: For handling client-side routing.
- Express.js: A web application framework for Node.js.
- MongoDB: A NoSQL database used to store blog post data.
- Mongoose: An Object Data Modeling (ODM) library for MongoDB.
- bcrypt: For password hashing and authentication.
- JSON Web Tokens (JWT): For user authentication and authorization.
- Multer: A middleware for handling file uploads.
- Node.js: Make sure you have Node.js installed. You can download it from https://nodejs.org/.
- MongoDB: Install and configure a MongoDB instance. You can download MongoDB from https://www.mongodb.com/try/download/community.
-
Clone this repository:
git clone https://github.com/prasanth7890/Blog-App.git
-
Install dependencies for both the client and API:
cd client npm install cd ../api npm install
-
Create a .env file in the "api" folder and set the following environment variables:
DB_URL=your_mongodb_connection_string SECRET=your_secret_key
-
Start the server (from the "api" folder) and the client application (from the "client" folder) separately:
nodemon server.js
npm start
Once the server and client are running, you can access the application by visiting http://localhost:3000 in your web browser.
The app allows users to:
- Users can login and Register
- Create new blog posts
- View existing blog posts
- Edit and update blog posts