我试图将一个名为“ flask”的小型练习应用程序从git推送到heroku,但是,无论我做什么,当我在终端中使用以下任何命令时,我都会遇到相同的问题:
heroku logs --app flask
heroku access --app flask
heroku git:remote -a flask
结果总是在相同的输出中:
You do not have access to the app flask.
app.py文件的代码:
from flask import Flask
from flask import render_template
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'What a beautiful, rainy day!'
@app.route('/templates')
def index():
return render_template('hello.html')
if __name__ == "__main__":
port = int(os.environ.get('PORT', 5000))
app.run(host='0.0.0.0', port=port)
无论如何,我希望对你们有足够的信息!谢谢!
答案 0 :(得分:0)
解决了以下问题:
heroku create
heroku git:remote [appname]
无法访问不存在的内容...