JavaScript Snippets

Creating a Nodejs Module 1) Create a package.json using npm init $ npm init This utility will walk you through creating a package.json file. It only covers the most common items, and tries to guess sane defaults. See npm help json for definitive documentation on these fields and exactly what they do. Use npm install <pkg> --save afterwards to install a package and save it as a dependency in the package.json file. ...

March 1, 2010 · 3 min · 484 words · Micha Kops