-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathrun.py
More file actions
23 lines (19 loc) · 639 Bytes
/
run.py
File metadata and controls
23 lines (19 loc) · 639 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!flask/bin/python
from app import app
from flask_session import Session
import os
import sys
host = "0.0.0.0" if "--docker" in sys.argv else "localhost"
port = int(os.environ.get("PORT", 3000))
os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1'
if os.environ.get("DEBUG", False) == "True":
app.config["DEBUG"] = True
app.config['SESSION_TYPE'] = 'filesystem'
sess = Session()
sess.init_app(app)
app.run(host=host, port=port, debug=True)
else:
app.config['SESSION_TYPE'] = 'filesystem'
sess = Session()
sess.init_app(app)
app.run(host=host, port=port, extra_files="api_type.py")