import sys import os import bottle import rollbar import webob import app.env app.env.name = 'prod' import app.controllers from app.lib.json_api_middleware import JsonApiMiddleware from app.lib.trailing_slash_filter import remove_trailing_slash from app import config rollbar.init(config.read_secret('rollbar_key'), 'production') def application(environ, start_response): try: application = bottle.app() application.catchall = False application = JsonApiMiddleware(application) return application(environ, start_response) except: rollbar.report_exc_info(sys.exc_info(), webob.Request(environ)) # Bare bones 500 handler content = b'' if environ.get('JSON'):
import os import bottle import rollbar import webob import app.env app.env.name = 'prod' import app.controllers from app.lib.json_api_middleware import JsonApiMiddleware from app.lib.trailing_slash_filter import remove_trailing_slash from app.lib.version_header import add_version from app import config rollbar.init(config.read_secret('rollbar_key'), 'production', code_version=app.env.sha1) def application(environ, start_response): try: application = bottle.app() application.catchall = False application = JsonApiMiddleware(application) return application(environ, start_response) except: rollbar.report_exc_info(sys.exc_info(), webob.Request(environ)) # Bare bones 500 handler
import os import bottle import rollbar import webob import app.env app.env.name = 'prod' import app.controllers from app.lib.json_api_middleware import JsonApiMiddleware from app.lib.trailing_slash_filter import remove_trailing_slash from app import config rollbar.init(config.read_secret('rollbar_key'), 'production') def application(environ, start_response): try: application = bottle.app() application.catchall = False application = JsonApiMiddleware(application) return application(environ, start_response) except: rollbar.report_exc_info(sys.exc_info(), webob.Request(environ)) # Bare bones 500 handler content = b'' if environ.get('JSON'):
import os import bottle import rollbar import webob import app.env app.env.name = "prod" import app.controllers from app.lib.json_api_middleware import JsonApiMiddleware from app import config rollbar.init(config.read_secret("rollbar_key"), "production") def application(environ, start_response): try: application = bottle.app() application.catchall = False application = JsonApiMiddleware(application) return application(environ, start_response) except: rollbar.report_exc_info(sys.exc_info(), webob.Request(environ)) # Bare bones 500 handler content = b"" if environ.get("JSON"):
import bottle import rollbar import webob import app.env app.env.name = 'prod' import app.controllers from app.lib.json_api_middleware import JsonApiMiddleware from app.lib.trailing_slash_filter import remove_trailing_slash from app.lib.version_header import add_version from app import config rollbar.init(config.read_secret('rollbar_key'), 'production', code_version=app.env.sha1) def application(environ, start_response): try: application = bottle.app() application.catchall = False application = JsonApiMiddleware(application) return application(environ, start_response) except: rollbar.report_exc_info(sys.exc_info(), webob.Request(environ)) # Bare bones 500 handler content = b'' if environ.get('JSON'):