Skip to content Skip to sidebar Skip to footer

Is It Possible To Run Falcon App From Python?

I'm moving my code from Flask to Falcon and a small annoyance is that I can't seem to find way to run my Falcon-based app from the __main__ method. In my Flask app I had this: if _

Solution 1:

Sure use wsgiref, e.g.:

from wsgiref import simple_server

if __name__ == '__main__':
    with simple_server.make_server('', os.getenv('PORT', 5000), app) as httpd:
        httpd.serve_forever()

Post a Comment for "Is It Possible To Run Falcon App From Python?"