Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for production WSGI server #85

Merged
merged 2 commits into from
Dec 20, 2022

Conversation

chennin
Copy link
Contributor

@chennin chennin commented Dec 5, 2022

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
Copy link
Owner

eliasdoehne commented Dec 20, 2022

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

@eliasdoehne eliasdoehne merged commit 25f2fa2 into eliasdoehne:master Dec 20, 2022
@chennin chennin deleted the prod_wsgi branch December 23, 2022 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants