eliasdoehne / stellaris-dashboard

A graph dashboard and event log for Stellaris.
123 stars 14 forks source link

Add option for production WSGI server #85

Closed chennin closed 1 year ago

chennin commented 1 year ago

Dash prints a red Flask warning every startup:

MainProcess - 2022-12-05 15:11:56,080 - werkzeug - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.

This PR adds a new flag production that uses waitress instead of Dash to serve the WSGI app. (I picked waitress because out of the Flask suggestions it was the first one I got working and it was a small change).

In my testing, nothing looked broken, and waitress is faster, mostly noticeable on first load (or with browser cache disabled)

Waitress:

image

Flask:

image

eliasdoehne commented 1 year ago

nice, I never tested this and didn't expect a huge difference tbh. I'll merge this as it is now and test it later with the pyinstaller build, if it works there it can also be the default