- Make sure the sasl application is running.
- Start erlang_js.
- Create a Javascript VM via js_driver:new/0.
- Use the js module to execute Javascript.
Friday, January 21, 2011
Using erlang_js
This post concerns installing and using erlang_js, together with some sample code to demonstrate how to run and extract data from SpiderMonkey using erlang_js.
When installing erlang_js, you need a current version of Erlang. R14b04 (PPA)
according to Sean Cribbs (#riak @ Freenode), this is the version I used, previous versions from 2009 do not seem to work. Initially, I used a mercurial repo to fetch the erlang_js code, but I was later informed that I should use the GitHub repo instead, perhaps this is more up to date.
In order to execute javascript, we need (according to erlang_js docs):
Labels:
erlang_js spidermonkey
Subscribe to:
Post Comments (Atom)
Very good job!
ReplyDelete