figure out where to serve static images from and how to handle "wildcard" paths

This commit is contained in:
2025-09-13 23:13:52 -06:00
parent 779f15f069
commit d3d431944b
3 changed files with 17 additions and 0 deletions
+5
View File
@@ -9,6 +9,8 @@
package main
import (
"fmt"
"git.erbosoft.com/amy/amsterdam/ui"
"github.com/labstack/echo/v4"
)
@@ -16,6 +18,9 @@ import (
func setupEcho() *echo.Echo {
e := echo.New()
e.Renderer = &ui.TemplateRenderer{}
e.GET("/img/*", ui.AmWrap(func(ctxt ui.AmContext) (string, any, error) {
return "string", fmt.Sprintf("Path: %s", ctxt.URLPath()), nil
}))
e.GET("/", ui.AmWrap(func(ctxt ui.AmContext) (string, any, error) {
ctxt.VarMap().Set("amsterdam_pageTitle", "My Front Page")
return "framed_template", "top.jet", nil