mirror of
https://github.com/GSA/notifications-admin.git
synced 2025-12-09 14:45:00 -05:00
This is what Gunicorn is looking for when it’s running the app. Renaming this variable to `app` has caused the app to break once deployed on PaaS. This commit also renames `app` to `flask_app` to make it clear which app is wrapping which other app.
17 lines
385 B
Python
17 lines
385 B
Python
import os
|
|
|
|
from flask import Flask
|
|
from whitenoise import WhiteNoise
|
|
|
|
from app import create_app
|
|
|
|
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
|
|
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'app', 'static')
|
|
STATIC_URL = 'static/'
|
|
|
|
flask_app = Flask('app')
|
|
|
|
create_app(flask_app)
|
|
|
|
application = WhiteNoise(flask_app.wsgi_app, STATIC_ROOT, STATIC_URL, max_age=WhiteNoise.FOREVER)
|