added function to test callErlang() in js
This commit is contained in:
parent
fcc114a087
commit
6166a109fc
4 changed files with 7 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,3 +1,4 @@
|
||||||
*.swp
|
*.swp
|
||||||
*.dump
|
*.dump
|
||||||
*.beam
|
*.beam
|
||||||
|
Mnesia.*
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 5350ed21606606dbee5ecb07e974f2abb9106270
|
Subproject commit cbac148c440a93db44bad767a43c6d8619f6871f
|
||||||
|
|
@ -29,9 +29,9 @@ s.send(
|
||||||
"Token: %s\n\
|
"Token: %s\n\
|
||||||
Command: define\n\
|
Command: define\n\
|
||||||
Content-Type: text\n\
|
Content-Type: text\n\
|
||||||
Content-Length: 42\n\
|
Content-Length: 49\n\
|
||||||
\n\
|
\n\
|
||||||
function myFun() {return 'Hello world!' ;}" % token)
|
function myFun() {return callErlang('a', 'b') ;}" % token)
|
||||||
fs = s.makefile()
|
fs = s.makefile()
|
||||||
data = fs.readline()
|
data = fs.readline()
|
||||||
print "Token:", token
|
print "Token:", token
|
||||||
|
|
@ -54,6 +54,7 @@ print "Data: ", ' '.join(data.split(" ")[1:])
|
||||||
|
|
||||||
s.close()
|
s.close()
|
||||||
|
|
||||||
|
"""
|
||||||
HOST = 'localhost' # The remote host
|
HOST = 'localhost' # The remote host
|
||||||
PORT = int(sys.argv[1]) # The same port as used by the server
|
PORT = int(sys.argv[1]) # The same port as used by the server
|
||||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
|
|
@ -74,3 +75,4 @@ print "Token:", token
|
||||||
print "Data: ", ' '.join(data.split(" ")[1:])
|
print "Data: ", ' '.join(data.split(" ")[1:])
|
||||||
|
|
||||||
s.close()
|
s.close()
|
||||||
|
"""
|
||||||
|
|
|
||||||
2
start
2
start
|
|
@ -1,3 +1,3 @@
|
||||||
#!/usr/bin/env bash
|
#!/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
|
||||||
|
|
|
||||||
Reference in a new issue