Added templating
This commit is contained in:
17
app/web/routes.go
Normal file
17
app/web/routes.go
Normal file
@ -0,0 +1,17 @@
|
||||
package web
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/flamego/flamego"
|
||||
"github.com/flamego/template"
|
||||
)
|
||||
|
||||
func RegisterRoutes(f *flamego.Flame) {
|
||||
// index route - landing page for the user
|
||||
f.Get("/", func(t template.Template, data template.Data) {
|
||||
t.HTML(http.StatusOK, "index")
|
||||
})
|
||||
|
||||
// item list route - lists all of the items in the database
|
||||
}
|
Reference in New Issue
Block a user