Articles
Hosting
Fiddles
  • · JsApp.US [jsapp.us]
    A JSFiddle for Node.js.
Reference
npm
Packages
  • · express [npmjs.org] (fast, unopinionated, minimalist web framework)
  • · socket.io [npmjs.org] (realtime framework server)
  • REST
  • · hapi [hapijs.com]
  • · restify [npmjs.org]
JavaScript for the JVM
  • · Nashorn (jdk8) [en.wikipedia.org]
    Java (jdk8)
    1. ScriptEngineManager m = new ScriptEngineManager();  
    2. ScriptEngine e = m.getEngineByName("nashorn");  
    3.   
    4. e.eval( "print('Hello World!');" );  
  • · Node.jar [groups.google.com]
Node FAQ
  • How do I find my installed version?
    node -v
    
  • How do I upgrade node to the latest version?
    First, clean the cache:
    sudo npm cache clean -f
    

    Next, install n (github):
    sudo npm install n -g
    

    To upgrade to the latest stable release (on os x):
    sudo n stable
    

    To upgrade to a particular release (on os x):
    sudo n m.m.m
    
    [reference]
npm FAQ
  • How do I get help?
    npm help [command]
    
  • How do I find my installed version?
    npm -v
    
  • How do I list all installed packages and their dependencies?
    List all local packages:
    npm ls
    

    List all global packages:
    npm ls -g
    
  • How do I list just the installed packages (without dependencies)?
    List local packages:
    npm ls --depth=0
    

    List global packages:
    npm ls --depth=0 -g
    
  • How do I list all dependencies of a single module?
    List dependencies of a single package via the remote npm repo:
    npm view <module>[@version] dependencies
    

    Or your local install:
    # first, cd to any package
    cd my-projects/example-1/node_modules/<module>
    
    # then list its dependencies
    npm ls
    
  • How do I install a module as a global executable (e.g., command-line utility)?
    Install it globally by using the -g option. Example:
    # install the grunt command-line utility globally (so it can be added to the system path and enable it to be used in any directory).
    sudo npm install -g grunt-cli
    
  • How do I install a module for use by an app (with require)?
    The module must be installed separately for each app. Example:
    # install grunt for use by lab-kit-js (optionally add --save-dev to auto-update the package.json file).
    cd /Users/George/Projects/html5/lab-kit-js
    sudo npm install grunt --save-dev
    
    # install grunt for use by css-lab (optionally add --save-dev to auto-update the package.json file).
    cd /Users/George/Projects/html5/css-lab
    sudo npm install grunt --save-dev
    
    Note: npm is not Maven. Released packages are not stable. Until just recently, you could force publish a released packaged module (i.e., a v1.2 module behaved like a maven v1.2-SNAPSHOT).
  • How do I uninstall a module?
    npm uninstall <module> [-g] [--save|--save-dev|--save-optional]
    
  • How do I clean the npm cache?
    sudo npm cache clean -f
    
  • How do I upgrade npm to the latest version?
    npm update npm -g
    
    [reference]
  • How do I upgrade npm packages to the latest version?
    To upgrade local packages to the latest version:
    npm update
    

    To upgrade global packages to the latest version:
    npm update -g
    
  • Where does npm store global executables?
    npm bin -g
    
  • Where does npm store global modules?
    npm root -g
    
Node.js Summary