#### Api request : **POST** /api/blogs/newblog #### Goals * create a query to insert new blog data in sql * take necessary inputs * the necessary details will be in `req.body` * return a JSON response along with response status * use `authmiddleware` i created as middleware to protect the route #### Prerequisites * understand `await` and async functions in Javascript * or just copy other pattern * learn middlewares in express js
Api request : POST /api/blogs/newblog
Goals
req.bodyauthmiddlewarei created as middleware to protect the routePrerequisites
awaitand async functions in Javascript