Maket it work under gunicorn

This commit is contained in:
Guy Van Sanden 2025-02-04 18:43:29 +01:00
parent 0c4b224605
commit 697483f240

View File

@ -1,5 +1,6 @@
#!/bin/env python3
from flask import Flask, request, jsonify
from flask_socketio import SocketIO
import websocket
import json
import yaml
@ -9,6 +10,7 @@ __version__ = "2.0.0b1"
versionstring='Taurix TellMe server v' + __version__
app = Flask(__name__)
socketio = SocketIO(app, async_mode='gevent')
hooks = {}
with open(r'/etc/tellme/hooks.yml') as hooksfile:
@ -59,4 +61,4 @@ if __name__ == '__main__':
print("Started %s" % (versionstring))
uri = "ws://localhost:5080"
ws = websocket.create_connection(uri)
app.run(debug=True)
socketio.run(app, host="0.0.0.0", port=8080)