Updated scripts to enable deploying prod server

This commit is contained in:
2024-01-28 01:19:37 +00:00
parent d80b07d43d
commit 3eea1d946a
3 changed files with 38 additions and 20 deletions

30
app.py
View File

@@ -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)