Updated run_server.sh
Updated ws_talk.py
This commit is contained in:
parent
ac7476c8a1
commit
92eff84613
|
|
@ -4,7 +4,7 @@ port=$1
|
||||||
|
|
||||||
if [ -d venv ]; then
|
if [ -d venv ]; then
|
||||||
source venv/bin/activate
|
source venv/bin/activate
|
||||||
sanic server.server.app -H 0.0.0.0 -p $port
|
sanic server.server.app -H localhost -p $port
|
||||||
else
|
else
|
||||||
python3.10 -m venv venv
|
python3.10 -m venv venv
|
||||||
source venv/bin/activate
|
source venv/bin/activate
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import json
|
import json
|
||||||
from websocket import create_connection
|
from websocket import create_connection
|
||||||
|
|
||||||
ws = create_connection("ws://192.168.1.1/update")
|
ws = create_connection("ws://localhost:1212/update")
|
||||||
ws.send()#json.dumps({"op":"addr_sub", "addr":"dogecoin_address"}))
|
ws.send(payload="")#json.dumps({"op":"addr_sub", "addr":"dogecoin_address"}))
|
||||||
result = ws.recv()
|
result = ws.recv()
|
||||||
print(result)
|
print(result)
|
||||||
ws.close()
|
ws.close()
|
||||||
Loading…
Reference in New Issue
Block a user