簡體   English   中英

無法讓Hello World在Heroku上運行

[英]Can't get Hello World to work on Heroku

我有我的基本程序

    def test():
        print("Hello World")
    test()

以及Procfile。

    web: python test.py

當我在命令行中使用一次性dyno時,我得到的正是我所期望的。 但是,當我在Heroku儀表板上打開應用程序時,每次都會出現H10錯誤。 是什么賦予了?

編輯:日志

    2016-08-18T17:34:25.925592+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=hwt1.herokuapp.com request_id=a0cabc52-0f80-4094-a420-06147b8c860c fwd="199.133.80.68" dyno= connect= service= status=503 bytes=
    2016-08-18T17:34:26.646976+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=hwt1.herokuapp.com request_id=27121a16-ad6b-489f-8ffc-1d3b5e21d225 fwd="199.133.80.68" dyno= connect= service= status=503 bytes=

Heroku是一個虛擬主機服務; 您的代碼需要啟動綁定到端口80的Web服務器。僅運行立即終止的腳本不會這樣做。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM