Initial commit

This commit is contained in:
2021-04-16 19:53:02 +02:00
commit e7041b2ccd
13 changed files with 194 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
#!/usr/bin/env python3
from config import Config
import sentry_sdk
from sentry_sdk.integrations.flask import FlaskIntegration
from flask import Flask
from utils import register_all_error_handlers
# import views
from views import JobView
# Setup sentry
if Config.SENTRY_DSN:
sentry_sdk.init(
dsn=Config.SENTRY_DSN,
integrations=[FlaskIntegration()],
send_default_pii=True,
release=Config.RELEASE_ID,
environment=Config.RELEASEMODE
)
# create flask app
app = Flask(__name__)
app.config.from_object(Config)
register_all_error_handlers(app)
# register views
for view in [JobView]:
view.register(app, trailing_slash=False)
# start debuggig if needed
if __name__ == "__main__":
app.run(debug=True)