JavaScript – nodejs – 001.

The new version 18 for Node.js comes with a watch mode, so you might not need nodemon.
You can enable that using the –watch flag to watch the entry point and any imported module. To be more granular, –watch-path allows you to specify a particular directory that should react to changes.
These flags cannot be combined with –check, –eval, –interactive, or when used in REPL known as read–eval–print loop mode.
Just start your javascript-named index.js like this and make changes on fly:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.