Skip to content

Commit

Permalink
doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
yznts committed Jan 28, 2024
1 parent 91646a0 commit 3124efa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,13 @@ In addition to this, you must register HTMX handlers for your dynamic components
...
func main() {
// Initialize mux
mux := http.NewServeMux()
// Register pages
mux.HandleFunc("/", rendering.Handler(Page))
// Register components
mux.HandleFunc("/htmx/component", rendering.Handler(Component))
// Serve
http.ListenAndServe(":8080", mux)
}
Expand Down

0 comments on commit 3124efa

Please sign in to comment.