Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Running javascript from Erlang using erlang_js and SpiderMonkey
run() ->
{ok, Port} = js_driver:new(),
ok = js:define(Port, <<"function helloworld(name){return 'Hello, ' + name}">>),
js:call(Port, <<"helloworld">>, [<<"Generic Game Server">>]).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment