joh*_*ual 4 python heroku flask
有人可以在Heroku上向我解释这条错误消息吗?应用程序在本地工作正常,但从未在网上成功
heroku[slug-compiler]: Slug compilation started
heroku[slug-compiler]: Slug compilation finished
heroku[web.1]: State changed from crashed to starting
heroku[web.1]: Starting process with command `python app.py ${PORT}`
app[web.1]: * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
Run Code Online (Sandbox Code Playgroud)
该应用程序本身并不复杂
from flask import Flask, render_template
app = Flask(__name__, static_folder='static')
@app.route('/')
def hello_world():
return render_template('index.html')
if __name__ == '__main__':
from os import environ
app.run(debug=False, port=environ.get("PORT", 5000))
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4627 次 |
| 最近记录: |