MongoDB stubbornly working after attempted shut down with ctrl+c (Windows 10)

I’m running MongoDB 6.0
I’m doing the Node + MongoDB course,
“Handling and Logging Errors” section,
Part 5, “Express Async Errors”

I’m at the part after downloading and importing the express-async-errors NPM module, where you have to run your node server and then terminate Mongo Daemon, which I ran in command prompt, and I closed with ctrl+c:

But after I shut it down with ctrl+c, my endpoint requests still work for some reason. On postman I submit get requests and they work and return data from the database, which is supposed to be shut down so I can test the error-handling module.

The MongoDB documentation says ctrl+c is how to shut it down, and I tried a bunch of other shut down commands I saw in the documentation and floating around but no matter what I do it just keeps working. I know I could restart my comp to force it to shut down but I really need to know how to do it without resorting to that.

1 Like

i have the same problem xD
did u figure it out ?

Nope I gave up. That’s as far as I got with the tutorial.

One thing I learned was always use the exact version of everything that Mosh uses, even when he doesn’t tell you to, otherwise you run in to all sorts of compatibility problems with deprecated features down the road because his Node tutorial is very old.

It also took me weeks to get as far as I did. I’ll probably come back and do the whole tutorial again from the beginning at some point.

If you figure out how to shut down MongoD from the Windows command prompt please let me know! I’ll let you know if I ever figure it out.

1 Like

yeah i understand u
but there is a problem that i asked some mid Junior friends about if i should use the same old version of node packages in real world applications after the node tutorial and they told me no u shouldnt so i really have a hard time reading the difference in documentation and stackoverflow stuff :smiling_face_with_tear::broken_heart:

ok if i figure out how i will send u
and if there is any other problem in the tutorial stand with u send me maybe i face the same problem

Hi HexagonBen,

You can shut down MongoD by following these steps:

  1. Open Command Prompt/Powershell as Administrator.
  2. And run net stop MongoDB

Thanks! I’ll try that when I go back to the Node tutorial. @mody1 see Nazmul’s answer here!