/crud-with-mongodb

A node.js application for crud operation with mongodb

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

Crud with MongoDB

A node.js application for CRUD operation using MongoDB.

Route

const {
  getAllBlogs,
  createBlog,
  getBlogById,
  updateBlog,
  deleteBlog,
} = require("../controllers/BlogController");
 
const router = express.Router();
 
router.route("/").get(getAllBlogs).post(createBlog);
router.route("/:id").get(getBlogById).put(updateBlog).delete(deleteBlog);