Skip to content

Commit

Permalink
Use waitress instead of flask for prod
Browse files Browse the repository at this point in the history
  • Loading branch information
awlx authored Sep 18, 2023
1 parent cd29a42 commit 8ab2b81
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wgkex/broker/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from flask_mqtt import Mqtt
import paho.mqtt.client as mqtt_client

from waitress import serve
from wgkex.config import config
from wgkex.common import logger

Expand Down Expand Up @@ -168,4 +169,4 @@ def is_valid_domain(domain: str) -> str:
listen_host = listen_config.get("host")
listen_port = listen_config.get("port")

app.run(host=listen_host, port=listen_port)
serve(app, host=listen_host, port=listen_port)

0 comments on commit 8ab2b81

Please sign in to comment.