2 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()

Then visit http://localhost:8000/index.html on your browser.

Dir

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

Then visit http://localhost:8000/test.html on your browser.