iris/_examples/view/template_pug_3/main.go
2018-05-26 22:49:48 +03:00

21 lines
285 B
Go

package main
import "github.com/kataras/iris"
func main() {
app := iris.New()
tmpl := iris.Pug("./templates", ".pug")
app.RegisterView(tmpl)
app.Get("/", index)
// http://localhost:8080
app.Run(iris.Addr(":8080"))
}
func index(ctx iris.Context) {
ctx.View("index.pug")
}