iris/_examples/file-server/send-files/main.go
2017-07-10 18:32:42 +03:00

18 lines
260 B
Go

package main
import (
"github.com/kataras/iris"
"github.com/kataras/iris/context"
)
func main() {
app := iris.New()
app.Get("/", func(ctx context.Context) {
file := "./files/first.zip"
ctx.SendFile(file, "c.zip")
})
app.Run(iris.Addr(":8080"))
}