1 ZH_Actions
Lunny Xiao edited this page 7 years ago

Actions

File

tg := tango.New()
tg.Get("/index.html", tango.File("./public/index.html"))
tg.Run()

然后在浏览器访问 http://localhost:8000/index.html

Dir

tg := tango.New()
tg.Get("/:name", tango.Dir("./public"))
tg.Run()

然后在浏览器访问 http://localhost:8000/test.html