app=Flask(name,static_folder=“static”,static_url_path="/aaa",template_folder=“templates”)
__name__實際上是有值的,name=main,指的是該模塊所在的目錄
static_folder = “static”,設置靜態資源夾的名字是static
static_url_path,設置訪問靜態資源的url前綴,若不存在該項,默認為static
template_folder,存放html模板的模板夾名字
app.run(host=127.0.0.1,port=5008,debug=True)
host=127.0.0.1 設置訪問flask_web應用的ip是127.0.0.1
port=5008設置訪問flask_web應用的端口是5008
debug=True設置調試模式打開
print(app.url_map) 打印路由和視圖函數的對應關系
