node --watch script.js
Category: Node.js & npm/yarn
node --watch script.js
Restart the script automatically whenever the file changes — built-in alternative to nodemon (Node
Restarts the script automatically when the file is saved. Node 18+'s built-in alternative to the popular 'nodemon' package.