Is that possible to notify app.js file or any other file that I am using a specific script from package.json? my relevant scripts
"dev":"nodemon app.js",
"start":"node app.js"
In my case i have cron functions that run on background, its a problem when I using nodemon and some of those function invoked I kill them before them ended.
on other way , its more convenient to use nodemon on development, so i want to know if there is a way to notify my app.js if it run from "npm start" or "npm run dev"
npm start) and development/debug (npm run dev) and pass the name of the configuration to use either as a command line argument or (better) in an environment variable. The standard environment variableNODE_ENVis usually used to tell apart these situation. Its values would beproductionanddevelopment. nodejs.dev/en/learn/…