Flask Snippets

Reloading with other WSGI servers

Posted by Shane Holloway on 2010-07-16 @ 18:07 and filed in Utilities

If you want to use reloading with a different WSGI server, you can use werkzeug.serving.run_with_reloader directly.

For example, this snippet uses one of gevent's WSGIServers:

import gevent.wsgi
import werkzeug.serving

def runServer():
    app.debug = True

    ws = gevent.wsgi.WSGIServer(('', 5000), app)

This snippet by Shane Holloway can be used freely for anything you like. Consider it public domain.