Dano Manion

Node.JS Notes

Node.js

  • Everything in the node shell evaluates to something.

Terms

  • Isomorphic - JavaScript that can run both on the server and on the browser
  • npm - node package manager / access to community shared packages.

      $ npm init // Create package.json
    
    • package.json is for "scripts": is where you place all the task runners like, start and build. It simply runs scripts.

Global Variables

  • window = global

      global.fish = "gold";
      global.cat = "tiger";
    
  • process.exit - send terminate within a shell script
  • process.env - get dev enviromental variables

Install Node.js

  • Debian

    curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - sudo apt-get install -y nodejs

Sources

  1. Nodejs Documentation