Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDarrell Osborne
23,146 Pointspackage.json - Differences between using "main" or "script > start"?
I've seen a couple of different package.json configurations in some of the projects. Some projects the instructor uses the 'main' key with the value app.js (or whatever the file is called), and in others they use the 'start' key in the scripts object with a value like, 'node app'. I understand that both of them work. And 'nodemon' will start the app with either. But is the only reason for using the 'scripts > start' method to be able to start the app using the terminal command 'npm start'? Or is there another advantage?