【发布时间】:2017-09-01 05:38:18
【问题描述】:
我的 heroku 应用程序遇到应用程序错误并显示以下日志:
Starting process with command `gunicorn run:app`
Failed to find application: run
这是我的 Procfile
web: gunicorn run:flask_app
run.py 文件
从应用导入 create_app, db 从 app.auth.models 导入用户
if __name__ == '__main__':
flask_app = create_app('prod')
with flask_app.app_context():
db.create_all()
if not User.query.filter_by(user_name='harry').first():
User.create_user(user='harry', email='harry@potters.com', password='secret')
flask_app.run()
【问题讨论】: