I decided to change the structure of my routes to organize them a little better in my project. I'm now using a folder structure for user/admin roles.
Whenever I save a file, the usual behavior was that nodemon will restart my server and if nothing was wrong, it will start the server and connect to the DB (MongoDB). However, since I changed this, whenever I do save a new file or create it, I get an error saying listen EADDRINUSE: address already in use :::5000
.
There's nothing really wrong with the code, as once I save again it does both with no problem.
Any idea of what might be going on?