-
Install dependencies:
npm install
-
Start the server:
npm start
- Method: POST
- URL:
http://localhost:3000/api/auth/login
- Body (JSON):
{ "username": "YourUsername", "password": "YourPassword" }
- Method: POST
- URL:
http://localhost:3000/api/auth/register
- Body (JSON):
{ "username": "YourUsername", "password": "YourPassword" }
- Method: POST
- URL:
http://localhost:3000/api/blogs/create
- Body (JSON):
{ "title": "Blog Title", "content": "Blog Content", "category": "Blog Category" }
- Method: GET
- URL:
http://localhost:3000/api/blogs/all
- Method: GET
- URL:
http://localhost:3000/api/blogs/get/{blogId}
- Replace
{blogId}
with an actual ID.
- Replace
- Method: GET
- URL:
http://localhost:3000/api/blogs/search/:query
- Replace
:query
with your search title.
- Replace
- Method: PUT
- URL:
http://localhost:3000/api/blogs/update/{blogId}
- Replace
{blogId}
with an actual ID.
- Replace
- Body (JSON):
{ "title": "Updated Blog Title", "content": "Updated Blog Content", "category": "Updated Blog Category" }
- Method: DELETE
- URL:
http://localhost:3000/api/blogs/delete/{blogId}
- Replace
{blogId}
with an actual ID.
- Replace
- Method: GET
- URL:
http://localhost:3000/api/auth/all-users
- Method: GET
- URL:
http://localhost:3000/api/auth/get-user/:userId
- Replace
{userId}
with an actual ID.
- Replace
- Method: DELETE
- URL:
http://localhost:3000/api/auth/delete-user/:userId
- Replace
{userId}
with an actual ID.
- Replace