大家好!

最近因為要搞 python 專案,且需要 https 方式,所以找到 heroku 這個平台

參考一些教學之後,順利把平台程式給push 上去
例如: http://djangogirlstaipei.herokuapp.com/tutorials/deploy-to-heroku/?os=windows

但是立刻就遇到這個錯誤

2019-02-13T14:46:20.466541+00:00 heroku[router]: at=error code=H10 desc="App crashed" 
method=GET path="/favicon.ico" host=xxxxxxxx-django-shop01.herokuapp.com 
request_id=9224be3d-264e-4d62-8d0a-04b26f6eb5d9 fwd="200.200.200.200" 
dyno= connect= service= status=503 bytes= protocol=https

我確定我有新增資料庫與連線了
但是就是一直出現 code=H10 desc="App crashed"
這樣的錯誤

上網找一下
https://stackoverflow.com/questions/51483097/django-app-on-heroku-application-crashed

 

發現有人建議直接跑

heroku run python manage.py runserver


看看就知道

啊! 對阿 因為 heroku 也是這樣執行
所以這樣跑就是類似本地端這樣執行
有錯誤立刻就知道了

希望對您有幫助
給大家參考囉
感恩