Nodejs support

See #751 for discussion and original pull request.