I have an app that I'm writing, currently hosted on GAE (and what I've gotten completed so far is working fine). I want to also be able to have that app run on a local server, but I'm not sure how to go about doing this.
The goal being to be able to host this in the Google Cloud or on any other server I have access to (local, AWS, etc.) using the CherryPy server. Since the GAE install requires a little something like this:
app = cherrypy.tree.mount(Main(), '/', config=conf)
run_wsgi_app(app)
but running a local one requires something like this:
if __name__ == '__main__':
cherrypy.quickstart(Main(), '/', config=conf)
I find myself at a loss as to how to proceed. Should there be an if catch to decide how to start the server? If so, what should that trigger on? Is there a way to just say "start this sucker up" that will be recognized by AppEngine and also by CherryPy running on a local server?
Any guidance or suggestions would be appreciated. Thanks!