I am using the default nest start --watch
command to run the application in watch mode.
The server restarts upon the change of any source file, which is as expected.
However, I need to ignore some directories or files from restarting the server when a change occurs.
Is there a way to achieve this in NestJS?
I was able to find a workaround. That is updated nodemon.json file to include the directories that I want to ignore from restart. Then to start the app I am just running nodemon command.
{
"watch": ["src"],
"ext": "ts",
"ignore": ["public"],
"exec": "ts-node ./src/main"
}
Hope this helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With