A simple short for lazy developers - if no command line arguments and package.json exist then use the main property.
EDIT: was use index.js
or check for a package.json
file in the directory and use it's main
entry.
I like that even better. Updating description...
On it.
Why reopened? This change was applied in the last change to nodemon and released to npm...
i reopened because i didn't see the change in the changelist associated with this but i must have done something wrong because my comment wasn't included and the feature works now.
thanks a ton for adding it!
The change was here if you're interested: https://github.com/remy/nodemon/commit/88269bae0d7c9f59290ddacd4f970304c342290b#L1R129
<3 <3 <3 <3
this doesn't work for me, main is not intended to start the app, it would be nicer if we looked for a npm start
(ie. scripts.start
in package.json), and run that command as using npm --exec
Most helpful comment
this doesn't work for me, main is not intended to start the app, it would be nicer if we looked for a
npm start
(ie.scripts.start
in package.json), and run that command as usingnpm --exec