This is an online blogging platform that allows users to perform CRUD (Create, Read, Update, Delete) operations on blog posts. The platform features a robust user interface for writing, editing, viewing, and deleting posts.
- Create: Users can write and publish new blog posts.
- Read: Users can view published posts.
- Update: Users can edit their own blog posts.
- Delete: Users can delete their blog posts.
- User Authentication: Secure login and signup functionality.
- Backend: Node.js, Express.js
- Database: MongoDB
- Frontend: [Specify frontend technology if applicable]
- Environment: [Specify any specific environment or configuration if applicable]
-
Clone the repository
git clone https://github.com/adityadhiman-in/bloggo_mern_stack.git
-
Navigate to the project directory
cd your-repository
-
Install dependencies
npm install
-
Set up environment variables
Create a
.env
file in the root directory and add the following environment variables:PORT=3000 MONGO_URI=your_mongodb_connection_string
-
Start the application
npm start
The server will run on
http://localhost:3000
.
-
Access the application: Open your browser and go to
http://localhost:3000
. -
Endpoints:
POST /posts
- Create a new blog postGET /posts
- Retrieve all blog postsGET /posts/:id
- Retrieve a single blog post by IDPUT /posts/:id
- Update a blog post by IDDELETE /posts/:id
- Delete a blog post by ID
- CORS: Enabled for
http://localhost:3000
andhttp://localhost:5173
. - Body Parsing: JSON and URL-encoded data are supported.
Feel free to fork the repository and submit pull requests. If you find any issues or have suggestions for improvements, please open an issue on GitHub.
This project is licensed under the MIT License - see the LICENSE file for details.
Feel free to reach out if you have any questions or suggestions!
Made with ❤️ by Aditya Dhiman