en un clic
templ-http
// Integrate templ components with Go HTTP server using net/http. Use when connecting templ to web server, creating HTTP handlers, mentions 'templ server', 'HTTP routes', or 'serve templ components'.
// Integrate templ components with Go HTTP server using net/http. Use when connecting templ to web server, creating HTTP handlers, mentions 'templ server', 'HTTP routes', or 'serve templ components'.
Create new blogposts from a template or linkposts using the hydrate command.
Use when creating git commits, writing commit messages, or following version control workflows
Choose and create the right Neon branch type for testing and development. Use when users ask about Neon branching, migration testing with real data, isolated test environments, schema-only branch workflows for sensitive data, or branch creation via Neon CLI or Neon MCP. Triggers include "Neon branch", "test migrations safely", "branch production data", "schema-only branch", "reset branch" and "sensitive data testing".
Read files without making changes. Use when you need read-only file access.
Create reusable templ UI components with props, children, and composition patterns. Use when building UI components, creating component libraries, mentions 'button component', 'card component', or 'reusable templ components'.
Build interactive hypermedia-driven applications with templ and HTMX. Use when creating dynamic UIs, real-time updates, AJAX interactions, mentions 'HTMX', 'dynamic content', or 'interactive templ app'.
| name | templ-http |
| description | Integrate templ components with Go HTTP server using net/http. Use when connecting templ to web server, creating HTTP handlers, mentions 'templ server', 'HTTP routes', or 'serve templ components'. |
Use progressive disclosure: begin with the handler pattern, then add routing and middleware only as needed.
Use this skill when serving templ from net/http.
r.Context().func homeHandler(w http.ResponseWriter, r *http.Request) {
if err := components.HomePage().Render(r.Context(), w); err != nil {
http.Error(w, "render failed", http.StatusInternalServerError)
return
}
}
http.NewServeMux() and explicit handlers.r.Method when endpoint serves multiple actions.r.URL.Query()), form (r.ParseForm() + FormValue), path segments.http.FileServer and a dedicated prefix.func usersHandler(w http.ResponseWriter, r *http.Request) {
switch r.Method {
case http.MethodGet:
users := listUsers(r.Context())
_ = components.UserList(users).Render(r.Context(), w)
default:
http.Error(w, "method not allowed", http.StatusMethodNotAllowed)
}
}
templ-components.templ-htmx..templ: use templ-syntax.resources/handlers-and-routing.mdresources/middleware-and-errors.mdresources/request-and-response-patterns.mdnet/http: https://pkg.go.dev/net/http