In this project, I created a blog API that can handle these requests:
1.GET http://localhost:4000/posts Get all blog posts
2.GET http://localhost:4000/posts/:id Get a specific post by id
3.POST http://localhost:4000/posts Create a new blog
4.PATCH http://localhost:4000/posts/:id Edit an existing post
5.DELETE http://localhost:4000/posts/:id Delete a specific post by id
In this porject, there is also a server to test this API. Use npm install to get all dependencies, and open two terminals. One run "node index.js", the other one run "node server.js". Go to http://localhost:3000