mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-25 14:34:19 +00:00
76bac0833e
Now the app is inside its own module and can be used by the bot.
17 lines
No EOL
524 B
Python
17 lines
No EOL
524 B
Python
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' |