Updated scripts to enable deploying prod server
This commit is contained in:
30
app.py
30
app.py
@@ -8,24 +8,20 @@ from controllers.web.endpoints import blueprint
|
||||
Database manager...
|
||||
'''
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
def main():
|
||||
print(__package__)
|
||||
app = Flask(__name__)
|
||||
|
||||
# Set app secret key to sign session cookies
|
||||
secret_key = environ.get("APPSECRET")
|
||||
if secret_key is None:
|
||||
# NO Secret Key set!
|
||||
print("No app secret set, please set one before deploying in production")
|
||||
app.secret_key = "DEFAULTKEY"
|
||||
else:
|
||||
app.secret_key = secret_key
|
||||
|
||||
# Register a blueprint
|
||||
app.register_blueprint(blueprint)
|
||||
app.run(debug=True, host="0.0.0.0")
|
||||
# Set app secret key to sign session cookies
|
||||
secret_key = environ.get("APPSECRET")
|
||||
if secret_key is None:
|
||||
# NO Secret Key set!
|
||||
print("No app secret set, please set one before deploying in production")
|
||||
app.secret_key = "DEFAULTKEY"
|
||||
else:
|
||||
app.secret_key = secret_key
|
||||
|
||||
# Register a blueprint
|
||||
app.register_blueprint(blueprint)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
app.run(debug=True, host="0.0.0.0", port=8080)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user