I want to run a flask app on waitress and it’s not working.
My code:
from flask import Flask
app = Flask(__name__)
if __name__ == "__main__":
from waitress import serve
serve(app)
When I try to run the app from cmd it gets stuck and doesn’t do anything.
Thanks
>Solution :
Why do you think it’s stuck? By default waitress has log level set to WARNING, so you don’t see any debug outputs.
Try changing logging configuration, like this:
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(message)s')