---
title: "Discussion on \"Hooks in MongoDB and How to Use Them\" | Hashnode"
description: "Discussion on \"Hooks in MongoDB and How to Use Them\". Learn about hooks or middleware. In a Node server, you can use pre and post hooks to execute a function before/after an operation."
url: "https://hashnode.com/posts/hooks-in-mongodb/653cab42fb2b7a75e86a90d3"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Hooks in MongoDB and How to Use Them](https://widewipe.me/hooks-in-mongodb?utm_source=hashnode&utm_medium=feed)

Learn about hooks or middleware. In a Node server, you can use pre and post hooks to execute a function before/after an operation.

Oct 28, 2023 · 3 min read · widewipe.me  
Read the article

-   [#mongodb](https://hashnode.com/tag/mongodb)
-   [#mongoose](https://hashnode.com/tag/mongoose)
-   [#mongo](https://hashnode.com/tag/mongo)
-   [#mongodbshell](https://hashnode.com/tag/mongodbshell)
-   [#nodejs](https://hashnode.com/tag/nodejs)

## Written by

[Amartya Chowdhury](https://hashnode.com/@widewipe)

@widewipe

  
[View profile](https://hashnode.com/@widewipe)

Aspiring Fullstack Web Developer | MERN Stack

## Responses 2

Markdown supported · ⌘↵ to post

[Bishal Sarkar](https://hashnode.com/@bishalsarkar)

[Oct 28, 2023](https://hashnode.com/posts/hooks-in-mongodb/653cab42fb2b7a75e86a90d3/comment/653d1025b73f69961f26a5ee)

well done dude 👏

[Shreemoy Gorai](https://hashnode.com/@GamerGuru)

[Oct 28, 2023](https://hashnode.com/posts/hooks-in-mongodb/653cab42fb2b7a75e86a90d3/comment/653cc0cb7e9ee38b4f5a0bad)

Thanks, I actually needed this to know.
