Added templating

This commit is contained in:
2022-12-07 21:24:11 -05:00
parent a7da12d028
commit 6ebf79e0e0
7 changed files with 74 additions and 4 deletions

17
app/web/routes.go Normal file
View 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
}