Started working on test edit page; removed nodemon because it wasn't working
This commit is contained in:
12
main.go
12
main.go
@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
gotemplate "html/template"
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
@ -25,7 +26,16 @@ func main() {
|
||||
f.Use(flamego.Renderer())
|
||||
|
||||
// initialize templating engine
|
||||
f.Use(template.Templater())
|
||||
f.Use(template.Templater(template.Options{
|
||||
FuncMaps: []gotemplate.FuncMap{
|
||||
{
|
||||
"contains": web.Contains,
|
||||
},
|
||||
},
|
||||
Directory: "templates",
|
||||
Extensions: []string{".tmpl", ".html"},
|
||||
},
|
||||
))
|
||||
|
||||
// inject custom middleware
|
||||
f.Use(middleware.CustomVars)
|
||||
|
Reference in New Issue
Block a user