Configure your system to evaluate external JavaScript code.

For Mac...

Install NodeJS

NodeJS can be installed for Mac through package repositories such as Homebrew or MacPorts, or by using the installer downloaded from http://nodejs.org.

To install using the installer from nodejs.org, download the installer, double-click the resulting .pkg file, and follow the instructions.

Install the ZeroMQ package for NodeJS

Install the ZeroMQ package for NodeJS using the node package manager, npm. By default, npm will install the package to a folder named node_modules, but for ExternalEvaluate to find the installation, it needs to be placed in a directory called .node_modules in the home directory:

$ cd ~
$ npm install zeromq
$ mv node_modules .node_modules

Verify the installation

If the installation was successful, FindExternalEvaluators will find it automatically:

Evaluate JavaScript using NodeJS

Use the NodeJS installation to evaluate JavaScript code:

For Windows...

Install NodeJS

Download the NodeJS installer at http://nodejs.org and run the resulting executable file.

Install the ZeroMQ package for NodeJS

Install the ZeroMQ package for NodeJS using the node package manager, npm. By default, npm will install the package to a folder named node_modules, but for ExternalEvaluate to find the installation, it needs to be placed in a directory called .node_modules in the home directory:

> cd %HOMEPATH%
> npm install zeromq
> ren node_modules .node_modules

Verify the installation

If the installation was successful, FindExternalEvaluators will find it automatically:

Evaluate JavaScript using NodeJS

Use the NodeJS installation to evaluate JavaScript code:

For Linux...

Install NodeJS

NodeJS is available from most Linux package repositories such as APT or yum, or you can download an installer at http://nodejs.org.

Install the ZeroMQ package for NodeJS

Install the ZeroMQ package for NodeJS using the node package manager, npm. By default, npm will install the package to a folder named node_modules, but for ExternalEvaluate to find the installation, it needs to be placed in a directory called .node_modules in the home directory:

$ cd ~
$ npm install zeromq
$ mv node_modules .node_modules

Verify the installation

If the installation was successful, FindExternalEvaluators will find it automatically:

Evaluate JavaScript using NodeJS

Use the NodeJS installation to evaluate JavaScript code:

Notes
If you have installed NodeJS according to the preceding steps, but it is not discovered by FindExternalEvaluators, you can register it manually with RegisterExternalEvaluator; for example: