diff options
author | Martin Ashby <martin@martin-laptop.lan> | 2018-05-17 18:28:38 +0100 |
---|---|---|
committer | Martin Ashby <martin@martin-laptop.lan> | 2018-05-17 18:28:38 +0100 |
commit | e9ee34abf84a10911b2c6041534c2df7f91f052a (patch) | |
tree | 73621cc657cf25fa0e45656fc1c4bffb8aac7c14 | |
parent | 89edc8828065f482fc8ef02d2182ed91f6bf0b24 (diff) | |
download | unicornpaint-e9ee34abf84a10911b2c6041534c2df7f91f052a.tar.gz unicornpaint-e9ee34abf84a10911b2c6041534c2df7f91f052a.tar.bz2 unicornpaint-e9ee34abf84a10911b2c6041534c2df7f91f052a.tar.xz unicornpaint-e9ee34abf84a10911b2c6041534c2df7f91f052a.zip |
server will now serve static files
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | __pycache__/unicorn_hat_sim.cpython-35.pyc | bin | 4851 -> 0 bytes | |||
-rw-r--r-- | download_and_run.sh | 2 | ||||
-rw-r--r-- | server.py | 4 | ||||
-rw-r--r-- | unicorn.zip | bin | 7541 -> 7539 bytes |
5 files changed, 6 insertions, 5 deletions
@@ -7,8 +7,9 @@ /coverage # production -/build -/saves +/build/ +/saves/ +/__pycache__ # misc .DS_Store diff --git a/__pycache__/unicorn_hat_sim.cpython-35.pyc b/__pycache__/unicorn_hat_sim.cpython-35.pyc Binary files differdeleted file mode 100644 index 7348417..0000000 --- a/__pycache__/unicorn_hat_sim.cpython-35.pyc +++ /dev/null diff --git a/download_and_run.sh b/download_and_run.sh index ddc8714..7fc7fcc 100644 --- a/download_and_run.sh +++ b/download_and_run.sh @@ -1,4 +1,4 @@ pip3 install unicornhathd Flask Flask-Sockets \ && wget -N "https://raw.githubusercontent.com/MFAshby/unicornpaint/master/unicornpaint.zip" \ -&& unzip unicornpaint.zip \ +&& unzip -o unicornpaint.zip \ && python3 server.py @@ -22,7 +22,7 @@ LOAD = 'LOAD' # GLobal references to app & clients all_clients = set() -app = Flask(__name__, static_folder='build/') +app = Flask(__name__, static_folder='') sockets = Sockets(app) def send_state(): @@ -71,7 +71,7 @@ def load(saveName): for y, pixel in enumerate(row): unicorn.set_pixel(x, y, *pixel) unicorn.show() - + @sockets.route('/ws') def do_websocket(websocket): global all_clients diff --git a/unicorn.zip b/unicorn.zip Binary files differindex 5ce66b9..70bc7af 100644 --- a/unicorn.zip +++ b/unicorn.zip |