Discuss / Python / web.run_app 函数真是简洁明了

web.run_app 函数真是简洁明了

Topic source
app = web.Application()
app.router.add_route('GET', '/', index)
app.router.add_route('GET', '/hello/{name}', hello)

web.run_app(app, host='127.0.0.1', port=8000)

  • 1

Reply