Node.js is a server-side software system designed for writing scalable Internet applications, notably web servers.
It is build on built on Chrome's JavaScript runtime. Programs are written on the server side in JavaScript, using event-driven, asynchronous I/O to minimize overhead and maximize scalability.

Node.js contains a built-in HTTP server library, making it possible to run a web server without the use of external software, such as Apache or Lighttpd, and allowing more control of how the web server works. Node.js enables web developers to create an entire web application in JavaScript, both server-side and client-side.

The latest Node.js version can be downloaded from:

Even numbered versions (0.4, 0.6, 0.8) are stable, and odd numbered versions (0.3, 0.5) are unstable. The stable releases are API-stable, which means that if you are using 0.8.1 and 0.8.2 comes out, you should be able to upgrade with no issues.

How to browserify bitcore-lib and bitcore-mnemonic

Browserify will recursively analyze all the require() calls in your app in order to build a bundle you can serve up to the browser in a single <script> tag.

More information see:

Operating system used
macOS 10.12 Sierra

Software prerequisites

  1. Install browserify.
    Type: npm install -g browserify

  2. Show all installed node modules and their versions.
    Type: npm -g ls --depth=0

    You should see:
    [email protected]

  3. Show browserify help.
    Type: browserify --help

  4. Install uglifyjs.
    Type: npm install -g uglifyjs

  5. Show uglifyjs help.
    Type: uglifyjs --help

  6. Show all installed node modules and their versions.
    Type: npm -g ls --depth=0

    You should see:
    [email protected]

  7. In the following example "bitcore-lib" and "bitcore-mnemonic" will be browserified.

  8. Create a project directory.
    Type: mkdir ~/bitcore

  9. Install the node modules "bitcore-lib" and "bitcore-mnemonic" locally inside this folder.
    Type: cd ~/bitcore
    Type: npm install bitcore-lib
    Type: npm install bitcore-mnemonic

    The node modules are now installed in folder cd ~/bitcore/node_modules
    I have installed bitcore-lib v0.14.0 and bitcore-mnemonic v1.2.5

  10. Create a file index.js inside this folder.
    Type: touch ~/bitcore/index.js

  11. Enter the following lines in file index.js

    var bitcore = require('bitcore-lib');
    var Mnemonic = require('bitcore-mnemonic');

  12. Browserify the node modules

    Type: browserify -r bitcore-lib | uglifyjs > bitcore-lib.min.js
    Type: browserify -r bitcore-mnemonic --external bitcore-lib | uglifyjs > bitcore-mnemonic.min.js

  13. The files bitcore-lib.min.js and bitcore-mnemonic.min.js are created.
    How these libraries are used see: Online Ethereum tools