1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-25 06:24:19 +00:00
pds-2021-g2-nest/code/backend/nest_backend/app.py

17 lines
524 B
Python
Raw Normal View History

from flask import Flask
import os
app = Flask(__name__)
if os.getenv('COOKIE_SECRET'):
app.secret_key = os.getenv('COOKIE_SECRET')
else:
app.secret_key = "testing"
if os.getenv("JWT_SECRET_KEY"):
app.config["JWT_SECRET_KEY"] = os.getenv("JWT_SECRET_KEY")
else:
app.config["JWT_SECRET_KEY"] = "testing"
if os.getenv("DATABASE_URI"):
app.config['SQLALCHEMY_DATABASE_URI'] = os.getenv('DATABASE_URI')
else:
app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://postgres:password@localhost:5432/PdSDev'