mirror of
https://github.com/kataras/iris.git
synced 2025-12-23 21:07:03 +00:00
formatting
Former-commit-id: 037081db5d6d4434e873ca8b75334ee43e046b6a
This commit is contained in:
@@ -14,11 +14,9 @@ func main() {
|
||||
// - {{ current }}
|
||||
app.RegisterView(iris.HTML("./templates", ".html"))
|
||||
app.Get("/", func(ctx iris.Context) {
|
||||
|
||||
ctx.ViewData("Name", "iris") // the .Name inside the ./templates/hi.html
|
||||
ctx.Gzip(true) // enable gzip for big files
|
||||
ctx.View("hi.html") // render the template with the file name relative to the './templates'
|
||||
|
||||
})
|
||||
|
||||
// http://localhost:8080/
|
||||
|
||||
Reference in New Issue
Block a user