Flask running - Linux

Table of Contents

※ [本文轉錄自 Python 看板 #1KctcCc1 ]

作者: gn00618777 (非常念舊) 看板: Python
標題: [問題] Flask running
時間: Thu Dec 25 10:42:16 2014

我使用 Flask

寫一個 hello.py script


from flask import Flask
app = Flask(__name__)

@app.route("/")
def hello():
return "Hello World!"

if __name__ == "__main__":
app.run(host='0.0.0.0', port=80, debug=True)


最後執行

sudo python hello.py

並沒有出現

* Running on http://0.0.0.0:80/
* Restarting with reloader

等訊息,我看其他人的電腦跑都有這訊息,為何就我的沒有阿? 謝謝。

--

All Comments

Sarah avatarSarah2014-12-27
有沒有錯誤訊息?
Ursula avatarUrsula2014-12-30
哪個天才教你開在 80 port 上的 -_-
Olga avatarOlga2015-01-02
樓上厲害,我撇眼以為只是debug config沒開
Wallis avatarWallis2015-01-06
???網站上交的範例 為啥不能 80 port?
http://mattrichardson.com/Raspberry-Pi-Flask/
Christine avatarChristine2015-01-09
我換成1000 port 也沒出現任何訊息...
Blanche avatarBlanche2015-01-12
開在1024以後的port試試,unix體系port 1~1024需root權限
Quintina avatarQuintina2015-01-13
我在家裡的ubuntu 14就會出現Running等訊息...
公司的就不行
Emily avatarEmily2015-01-15
我公司筆電用12.04...一樣的步驟,卻不能出訊息..
Kelly avatarKelly2015-01-15
後來發現是縮排問題