changed file structure and build
This commit is contained in:
parent
cc36d46002
commit
06de3c2f7e
8 changed files with 5 additions and 8 deletions
BIN
src/ggs_app.beam
BIN
src/ggs_app.beam
Binary file not shown.
Binary file not shown.
BIN
src/ggs_sup.beam
BIN
src/ggs_sup.beam
Binary file not shown.
11
src/js_runner.erl
Normal file
11
src/js_runner.erl
Normal file
|
@ -0,0 +1,11 @@
|
|||
-module(js_runner).
|
||||
-export([executeJS/2, boot/0]).
|
||||
|
||||
boot() ->
|
||||
erlang_js:start(),
|
||||
{ok, Port} = js_driver:new(),
|
||||
Port.
|
||||
|
||||
executeJS(Port, Data) ->
|
||||
ok = js:define(Port, <<"function helloworld(name){return 'Hello, ' + name}">>),
|
||||
js:call(Port, <<"helloworld">>, [Data]).
|
Reference in a new issue