You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everybody :-)
Is this intended behavior?
As I see it, right now it's not possible to run a script ONLY on startup.
With using the restart event, its possible to only use a script on restart, so I would understand the start event to not also cover restarts, but exactly that is the case (at least in my setup / versions).
Any help appreciated.
Thanks!
The text was updated successfully, but these errors were encountered:
breytex
changed the title
Start event script als runs on restart
Start event script also runs on restart
Feb 14, 2020
nodemon -v
:2.0.2
node -v
:v10.18.1
MacOS high sierra / iterm2
docker 10-alpine
nodemon --inspect=0.0.0.0 --exec node src/index.js
with
Expected behaviour
src/script.js
is only executed once at startup and not when the I change a file and nodemon restarts the main app (src/index.js
).Actual behaviour
src/script.js
is executed on every restartSteps to reproduce
Create three files with a console log of its filename:
Create nodemon.json:
Run
Hello everybody :-)
Is this intended behavior?
As I see it, right now it's not possible to run a script ONLY on startup.
With using the
restart
event, its possible to only use a script on restart, so I would understand thestart
event to not also cover restarts, but exactly that is the case (at least in my setup / versions).Any help appreciated.
Thanks!
The text was updated successfully, but these errors were encountered: