0
我正在尝试部署一个简单的烧瓶应用。然后我选择gunicorn和nginx。 但是当我tryed应用程序只是gunicorn运行,出现如下异常:当使用Gunicorn时,烧瓶secret_key不可用,即使它已配置
RuntimeError: the session is unavailable because no secret key was set. Set the secret_key on the application to something unique and secret.
init.py
:
if __name__ == '__main__':
app.secret_key = config["secret-key"]
app.run(port=config["port"], host=config["host"], debug=config["debug"])