Skip to content

piyuxh01/Blog-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Welcome to the Blog App API! Welcome to the Blog App API, your one-stop solution for building a powerful backend for your blogging platform. This API is crafted with ❤️ using Node.js and Express.js, featuring user authentication and all essential CRUD operations for managing your blog posts effortlessly.

🛠️ Prerequisites Before diving into the exciting world of blogging with our API, make sure you have the following prerequisites installed:

Node.js: Need a quick setup? Visit nodejs.org to get started. npm: npm comes bundled with Node.js, making installation a breeze. 🔧 Installation Clone the repository:

bash Copy code git clone https://github.com/piyuxh01/blog-app.git Navigate to the project directory:

cd blog-app-api Install dependencies:

npm install ⚙️ Configuration Before launching the API, let's configure it. Rename the .env.example file to .env and customize the following variables:

PORT: Choose the port number for your server. DB_URI: Provide the connection URI for your MongoDB database. JWT_SECRET: Set a secret key for JWT (JSON Web Token) authentication. 🚀 Launching the API Ready for liftoff? Start the API server with the following command:

npm start 🛣️ API Endpoints Authentication POST /api/auth/register

Create a new user account. POST /api/auth/login

Log in as an existing user. Blog Posts GET /api/posts

Retrieve all blog posts. GET /api/posts/:id

Retrieve a specific blog post by ID. POST /api/posts

Create a new blog post. PUT /api/posts/:id

Update an existing blog post. DELETE /api/posts/:id

Delete a blog post. 🚨 Error Handling We've got you covered! Our API returns clear HTTP status codes and informative error messages in JSON format, ensuring a smooth sailing experience even during turbulent times.

🌟 Conclusion Congratulations! You're now equipped with a fancy Blog App API that's ready to revolutionize your blogging journey. Explore its features, integrate it with your frontend, and unleash your creativity!

For any questions or feedback, feel free to reach out to piyush720sinha@gmail.com or open an issue on our GitHub repository. Happy blogging! 📝✨

About

A Blog app api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors