-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
if no file is specified use package.json's main property #14
Comments
or check for a |
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: 88269ba#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 |
Makes no sense, this is ridiculous. Using "main" violates the principle of least astonishment. Node CLI DOES NOT uses "main" for starting the server, that's used for import clients not server start clients. I'm using the same project as a import to other bounded contexts to be able to execute code owned by one domain boundary and the server startup that uses npm run dev to start a specific server file using nodemon start-server. My npm start uses node start-server which works. How do I prevent this completely unexpected and erroneous behaviour? Any workaround? Please guys, avoid trying to do magic, I beg you. Nodemon is a great tool don't destroy it. I can open a PR reverting this if you want. This needs urgent reopening. Sorry if my tone sounds too demanding, just to express the frustration, I hope you don't take personally. Great work with nodemon! EDIT: solution was to use |
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
The text was updated successfully, but these errors were encountered: