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

"This is a development server" #354

Open
solemnwarning opened this issue Apr 28, 2024 · 0 comments
Open

"This is a development server" #354

solemnwarning opened this issue Apr 28, 2024 · 0 comments

Comments

@solemnwarning
Copy link

solemnwarning commented Apr 28, 2024

Hello,

When running the snappass script, I get the following warning on the console:

WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.

From a very brief skim of the Flask docs, production use is recommended to use something like Waitress as the actual HTTP server rather than the one bundled with Flask, which seems to work if I add the following function to main.py:

def get_app():
    return app

...and then run Waitress with the following command:

waitress-serve --call snappass:main.get_app

Is there a way to host snappass behind a "production recommended" HTTP server without modifications? Is there a reason to stick with the built-in Flask server instead?

Thanks

EDIT: You can use waitress with modifying main.py with the following command:

waitress-serve --call snappass.main:app
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

No branches or pull requests

1 participant