urb*_*urb 0 python flask gunicorn
我正在尝试部署一个简单的烧瓶应用程序.然后我选择了gunicorn和nginx.但是当我尝试使用gunicorn运行应用程序时,会出现以下异常:
RuntimeError: the session is unavailable because no secret key was set. Set the secret_key on the application to something unique and secret.
Run Code Online (Sandbox Code Playgroud)
init.py:
if __name__ == '__main__':
app.secret_key = config["secret-key"]
app.run(port=config["port"], host=config["host"], debug=config["debug"])
Run Code Online (Sandbox Code Playgroud)