Starting simple, package.json is for defining your project's dependencies. It does lots of other things, but this is the key thing.
To start a project, create a folder, and run "npm init" in that folder. Then when installing npm modules use: npm install <name> --save This adds them as dependencies to your package.json. There's more to know, but that should get you started. On Wed, Mar 26, 2014 at 10:49 AM, Frank Z <[email protected]> wrote: > I bought a book on Node.js since I'm teaching myself backend development, > and in this book the author talks about the importance of package.json > files. He emphasizes that it's great for keeping track of module > dependencies in a json format, and installing them all at once using "npm > install" in a terminal. So far so good... > > But how do I assign my package.json to a particular node.js file? Just > stick it in the same folder??? Does it not clash with the package.json file > that comes with locally installed npm modules? Do I just make the Name key > in the json file the exact same as my js file? > > Maybe the package.json is simply for putting your project on npm? > > I'm totally confused.... > > Would be cool if there was a node.js expert I could chat with over skype. > I'm so lost. > > -- > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
