feat: some improvements

This commit is contained in:
2021-01-13 20:49:25 +01:00
parent 4609edcd94
commit 9419544511
4 changed files with 207 additions and 196 deletions

9
app.py
View File

@@ -6,7 +6,7 @@ from flask import Flask, send_file, jsonify
from flask_socketio import SocketIO
from redis import Redis
logging.basicConfig(level=logging.DEBUG)
logging.basicConfig(level=logging.INFO)
LOG = logging.getLogger(__name__)
DATA_URL_PREFIX = 'data:image/jpeg;base64,'
# DEBUG = True
@@ -46,7 +46,12 @@ class CameraListener:
@app.route('/<string:path>')
@app.route('/<path:path>') # does not seem to work
def index(path):
return send_file('client/dist/index.html')
if path == 'reset.css':
return send_file('client/dist/reset.css')
elif path == 'favicon.ico':
return send_file('client/dist/favicon.ico')
else:
return send_file('client/dist/index.html')
@app.route('/api/sounds')