added function to test callErlang() in js

This commit is contained in:
Jeena Paradies 2011-02-06 19:17:08 +01:00
parent fcc114a087
commit 6166a109fc
4 changed files with 7 additions and 4 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
*.swp
*.dump
*.beam
Mnesia.*

@ -1 +1 @@
Subproject commit 5350ed21606606dbee5ecb07e974f2abb9106270
Subproject commit cbac148c440a93db44bad767a43c6d8619f6871f

View file

@ -29,9 +29,9 @@ s.send(
"Token: %s\n\
Command: define\n\
Content-Type: text\n\
Content-Length: 42\n\
Content-Length: 49\n\
\n\
function myFun() {return 'Hello world!' ;}" % token)
function myFun() {return callErlang('a', 'b') ;}" % token)
fs = s.makefile()
data = fs.readline()
print "Token:", token
@ -54,6 +54,7 @@ print "Data: ", ' '.join(data.split(" ")[1:])
s.close()
"""
HOST = 'localhost' # The remote host
PORT = int(sys.argv[1]) # The same port as used by the server
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
@ -74,3 +75,4 @@ print "Token:", token
print "Data: ", ' '.join(data.split(" ")[1:])
s.close()
"""

2
start
View file

@ -1,3 +1,3 @@
#!/usr/bin/env bash
erl -sname ggs -mnesia -boot start_sasl -pa erlang_js/ebin/ -pa ebin -pa src -s start_ggs
erl -sname ggs -mnesia -boot start_sasl -pa erlang_js/ebin/ -pa ebin -pa src -s start_ggs -sname ggs