Skip to content

Instantly share code, notes, and snippets.

@developer-rakeshpaul
Forked from kacieh80/app.py
Created May 7, 2016 06:20
Show Gist options
  • Save developer-rakeshpaul/a7e7108f5d08fad56371e152e9d15a72 to your computer and use it in GitHub Desktop.
Save developer-rakeshpaul/a7e7108f5d08fad56371e152e9d15a72 to your computer and use it in GitHub Desktop.

Revisions

  1. kacieh80 revised this gist Dec 24, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion app.py
    Original file line number Diff line number Diff line change
    @@ -7,6 +7,6 @@

    wsgi_app = falcon.API(after=[db_session.remove_session])

    autoload("{0}/{1}".format(os.path.dirname(__file__), "/handlers"))
    autoload("{0}/{1}".format(os.path.dirname(__file__), "handlers"))
    add_routes(wsgi_app)
    wsgi_app.add_error_handler(Exception, build_error_response)
  2. kacieh80 created this gist Dec 24, 2015.
    12 changes: 12 additions & 0 deletions app.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    import falcon
    import os

    from app.db import db_session
    from app.utils.exceptions import build_error_response
    from app.startup import (autoload, add_routes)

    wsgi_app = falcon.API(after=[db_session.remove_session])

    autoload("{0}/{1}".format(os.path.dirname(__file__), "/handlers"))
    add_routes(wsgi_app)
    wsgi_app.add_error_handler(Exception, build_error_response)