TIL Node’s `–watch` flag
Published
I totally missed this: Node has a --watch
flag which you can use like so:
node --watch app.js
Or in your package.json’s start
script:
{
"scripts": {
"start": "node --watch app.js"
}
}
This effectively replaces nodemon, at least for the most common workflows. This was announced in Node 18.
I love hearing from readers so please feel free to reach out.
Reply via email • Subscribe via RSS or email
Last modified #til #dx #js #programming