Search code examples
pythonfalconframework

How can I get a live reload like GAE with FALCON?


I am setting up a new project that is going to use python to build a RESTful back end. I looked at GAE, but choose Falcon Framework, because the application needs to eventually be installed on local servers. GAE has a great development feature, it allows for iterative development by watching the source, and reloading.

You can leave the web server running while you develop your application. The web server knows to watch for changes in your source files and reload them if necessary.

How can I set up Falcon to do the same thing?


Solution

  • This may not be the best answer, but I found that there is no simple method that does not require more software installed the way GAE does it, but after you install gunicorn, your can use the --reload switch and the server will auto-reload the source.

    $ gunicorn -b 127.0.0.1:8000 -b [::1]:8000 --reload myapp:app
    

    Docs: http://docs.gunicorn.org/en/19.0/settings.html#reload