Search code examples
pythonbottlewsgiserver

Python: Automatically restart WSGIServer+Bottle app on file changes


I'm playing with Bottle & Gevent to have an HTTP + WebSockets server. If I were to implement this in Node I'd use Nodemon or similar to restart the server on changes to the code while developing. If I was using just Bottle and the run method I believe I could use run(reloader=True)—however I am running the app using WSGIServer. Given this, how can I have the autoreload functionality I'm after?

http_server = WSGIServer(('127.0.0.1', 8080), app, handler_class=WebSocketHandler)


Solution

  • After searching on pypi I think that server-reloader will do what you ask.