静态文件

    Static 让你用一行代码可以完成一个静态服务器。

    1. http://localhost/images/logo.png --> ./public/images/logo.png

    当然,你也可以加入你basicauth或者你自己的认证中间件,这样就变为了一个私有的文件服务器。

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

      1. tg.Get("/:name", tango.Dir("./public"))