.run()
. The file is saved to server.py
.
This Flask application was written using Blueprints, which is useful
for separating components when working with a large Flask application.
Here, the nested block in if __name__ == '__main__'
could be in a separate
file from the 'hello'
Blueprint.
ProxyFix
function from werkzeug
.
More information about proxies is provided here.
anaconda-project.yml
file, you define a deployable command as follows:
supports_http_options
means that server.py
is expected to act on the following command line arguments defined in the Anaconda Project Reference.
This is easily accomplished by adding the following argparse
code before calling app.run()
in server.py
app.run()
. Note that
registering the Blueprint provides a convenient way to deploy
your application without having to rewrite the routes.