NodeJS

Node.jsĀ® is a JavaScript runtime built on Chrome’s V8 JavaScript engine.

Top Users

  1. LinkedIn

  2. The WalMart

  3. Netflix

  4. Uber

  5. PayPal

  6. NASA

Standard Library

We should keep the API documentation handy because it’s good!

NPM

It’s the package manager for Node! It might stand for Nuturing Palpable Magnificence, according to their site, but it also might stand for something else. [Like Node Package Manager.]

Useful packages

  1. sass

  2. angular

  3. cordova

  4. express

  5. jasmine

  6. mongodb

  7. tslint

  8. eslint

Find your executable project modules like this:

$ ls -a node_modules/.bin
.       ..      jasmine

Starting a project

npm init

Debugging

Node inspector

Can be run with node --inspector-brk <your file here>

When this runs, we will go to chrome:inspect to attach to the node process. We will then have full debugging tools.

WebStorm

JetBrains Student license (Resubscribe every year!)

Jasmine

You can install jasmine with this command in your project directory: npm install jasmine --save-dev

Using the example to get started

You should set up Jasmine as the test runner with npx jasmine init

You can set up the example Jasmine project with npx jasmine examples

Have a look at the files that were added to see what’s what.

package.json

We should update the "scripts/test" key in our package.json file to run Jasmine. We’ll put in npx jasmine to do this as that is the command used to run the tests.

From here on out, we can run npm test to run our testing framework!

General tips