Auto-reload Code during Development
The one thing that I'm missing from Django is the ability to leave a Brubeck Python app up and let it reload the source code automatically as I'm writing it.
What do we need to do to implement this? Would be happy to dive into this, but I'm not sure where to start. Thanks!
Django's autoreload module may give an idea. Apparently they borrowed most of it from CherryPy.
https://github.com/django/django/blob/master/django/utils/autoreload.py
and here's CherryPy's autoreloader:
https://bitbucket.org/cherrypy/cherrypy/src/b0c48210b25018768532a370a522a660db6236f8/cherrypy/process/plugins.py#cl-540
Got it! Reading the code now. Will take a shot at this.
Sweet. I have a basic implementation working! Will start cleaning it up.
One issue: since Brubeck apps are invoked directly, while Django apps rely on manage.py runserver, should I ship this as an external tool, like manage.py? Or as a parameter in Brubeck.__init__()/Brubeck.run()?
Thanks for your patience! I'm new to this.
I like the idea of a parameter, so I can define a debug var and the app launches in auto-reload, no debug var and it runs without it.
Well, there is an option in werkzeug to do this, currently I am working on supporting multiple wsgi servers, I would suggest something to experiment with already existing one and then integrate to brubeck when we have enough knowledge. Anyways kudos to the idea
On Mon, Oct 29, 2012 at 10:09 PM, Paul Eipper [email protected]:
I like the idea of a parameter, so I can define a debug var and the app launches in auto-reload, no debug var and it runs without it.
— Reply to this email directly or view it on GitHubhttps://github.com/j2labs/brubeck/issues/87#issuecomment-9875497.
Thanks & Regards
"Talk is cheap, show me the code" -- Linus Torvalds kracekumar www.kracekumar.com *
@DavidYKay did you ever complete this implementation? I'm interested in auto-reload as well as I use it a bunch in nodejs development with the node-dev module.