Nodemon: if no file is specified use package.json's main property

Created on 6 Mar 2011  ·  8Comments  ·  Source: remy/nodemon

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

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 using npm --exec

All 8 comments

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!

<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

Was this page helpful?
0 / 5 - 0 ratings