Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Node.js and NPM Tutorial

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.

Node.js and NPM Tutorial

Avatar for Nicolas

Nicolas

April 24, 2019
Tweet

More Decks by Nicolas

Other Decks in Programming

Transcript

  1. Node.js and NPM Tutorial A Web Development Tool Presented by:

    Daniel Snyder, Trevor Huis in’t Veld, Nicholas Arrieche, and Uriel Buitrago
  2. Node.js • Initially released May 27, 2009 • JavaScript runtime

    environment for executing JS code outside a browser • Open-source and cross platform ◦ Linux, macOS, Microsoft WIndows, SmartOS, FreeBSD, OpenBSD, and IBM AIX • Lets developers use JavaScript to write command line tools • Allows for JavaScript full stack development
  3. Node.js uses • Run JavaScript on a terminal • Generate

    dynamic page content • Create, open, read, write, delete, and close files on the server • Collect form data • Add, delete, modify data in your database
  4. Node Package Manager • Initially released on January 12, 2010

    • npm is the standard package manager for Node.js • Essential JavaScript development tool ◦ Used by over 11 million JS developers • Largest single language code repository/software registry in the world ◦ 350,000+ Packages • Used by 500 of the Fortune 500 (and almost any other company with a website)
  5. What is a package? • Also called a module •

    A directory with one or more files ◦ Must include package.json • Think of a building block that solves one specific problem really well • Many different packages can be used in conjunction to create custom solutions • Developers create packages and upload them to the npm registry for others to use
  6. NPM’s Three Components • Website: https://www.npmjs.com/ ◦ Find new packages

    to use, set up Orgs to manage access to packages • Command Line Interface (CLI) ◦ Runs from terminal ◦ How most developers utilize npm • Registry ◦ Large public database of JavaScript software packages, and the meta-information surrounding it
  7. NPM Uses • Use packages from registry, or adapt them

    to fit your personal project • Download tools • Run packages without downloading them • Share code with any npm users • Restrict code to specific developers • Create Orgs to maintain package maintenance, coding, and developers • Form virtual teams using Orgs • Update applications when packages are updated
  8. Installation • npm is automatically installed with Node.js • Can

    be downloaded at https://nodejs.org • Check if npm is installed: