Add "application" alias to API object

By default gunicorn looks for an "application" object to run, so this
saves us having to type api:app.
This commit is contained in:
Alan Orth 2018-10-26 18:21:27 +02:00
parent 2136dc79ce
commit b8356f7a87
2 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ Index the Solr statistics core to populate the PostgreSQL database:
Run the REST API:
$ gunicorn dspace_statistics_api.app:api
$ gunicorn dspace_statistics_api.app
Test to see if there are any statistics:

View File

@ -66,7 +66,7 @@ class ItemResource:
def on_exit(api):
print("Shutting down DB")
api = falcon.API()
api = application = falcon.API()
api.add_route('/items', AllItemsResource())
api.add_route('/item/{item_id:int}', ItemResource())