bottle用http默认端口

1
2
3
4
5
6
7
8
9
10
11
12
from bottle import Bottle, run


web = Bottle()
@web.route('/')
def index():
return "hello 80端口"

run(web,host='localhost',port='80')


#因为80是http的默认端口,所以这时访问localhost不需要写端口

转载请注明来源 https://tianweiye.github.io