Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
linkdata committed Dec 18, 2024
1 parent 537896d commit deff599
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jawsboot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ so that when running with `-tags debug` or `-race` templates are reloaded from d
//go:embed assets
var assetsFS embed.FS

func setupRoutes(jw *jaws.Jaws, mux *http.ServeMux) (err error) {
func setupRoutes(jw *jaws.Jaws, mux *http.ServeMux) (faviconuri string, err error) {
var tmpl jaws.TemplateLookuper
if tmpl, err = templatereloader.New(assetsFS, "assets/ui/*.html", ""); err == nil {
jw.AddTemplateLookuper(tmpl)
var faviconuri string
if faviconuri, err = staticserve.HandleFS(assetsFS, "assets", "static/images/favicon.png", mux.Handle); err == nil {
if err = jawsboot.Setup(jw, mux.Handle, faviconuri); err == nil {
mux.Handle("/jaws/", jw) // ensure the JaWS routes are handled
// set up your other routes
}
}
Expand Down

0 comments on commit deff599

Please sign in to comment.