node --watch-path=src/ script.js
Category: Node.js & npm/yarn
node --watch-path=src/ script.js
Watch an entire directory for changes and restart the script when any file changes (Node 19+)
Watches an entire directory for changes and restarts the entry script when any file inside changes (Node 19+).