Stencila for Node.js
npm install stencila-node --global --python=python2.7
This package relies on dependencies with native add-ons (e.g.
xeromq). So you will need to have
node-gyp installed (https://github.com/nodejs/node-gyp#readme). The
--python flag is necessary because, on OSX and Windows,
node-gyp is only compatible with Python 2.7.
Register this Stencila package,
This creates a host manifest file in the Stencila hosts directory (e.g.
~/.stencila/hosts/node.js on Linux). This file is used by Stencila Desktop and other packages to determine which Stencila hosts you have installed on your machine.
or inside Node.js:
const stencila = require('stencila-node') stencila.run()
This will serve a Stencila
stencila-node compile "~/stencila/source/libcore/"
API documentation is available at https://stencila.github.io/node.