This Node.js project is a backend service for a Blog Management Platform, providing essential functionalities for user management and blog post management. It utilizes Express.js, Bcryptjs, Jsonwebtoken, and Mongoose for efficient development.
Base url: https://blog-management-api-nwkl.onrender.com/
- Sign up a new account
- Sign in with username and password
- Get specific user details
- Create a new blog post
- Get all blog posts
- Get a specific blog post
- Update a specific blog post
- Delete a specific blog post
Methods | Urls | Actions |
---|---|---|
POST | /api/auth/sign-up | Sign up a new user account. |
POST | /api/auth/sign-in: | Sign in with a username and password. |
GET | /api/auth/{userId}: | Get specific user details. |
Methods | Urls | Actions |
---|---|---|
POST | /api/posts: | Create a new blog post. |
GET | /api/posts: | Get all blog posts. |
GET | /api/posts/{postId}: | Get a specific blog post. |
PATCH | /api/posts/{postId}: | Update a specific blog post. |
DELETE | /api/posts/{postId}: | Delete a specific blog post. |
- Express.js: A web application framework for Node.js.
- Bcryptjs: A library for hashing and salting passwords.
- Jsonwebtoken: A library for creating JSON Web Tokens for user authentication.
- Mongoose: An ODM (Object Data Modeling) library for MongoDB.
Follow these steps to run the project locally:
git clone https://github.com/manishtmtmt/blog-management-api.git
cd blog-management-api
npm install
npm run dev
The project is documented with Swagger, providing detailed information about the available endpoints and their usage. You can access the Swagger documentation by visiting /api-docs
when the server is running.
Additionally, a Postman collection is provided, allowing you to test the API endpoints easily.
- Click here to access the Postman collection.
- Make sure you have Postman installed and registered.
- Click the Postman collection link above to open it in Postman.
- In Postman, click the "Import" button to add the collection to your workspace.
For detailed usage and examples of each API endpoint, please refer to the Swagger documentation or the Postman collection provided with this project.