Skip to main content

Server side rendering

Gofs apps use server side rendering. The http server serves html content generated on the server using templ components. The templ documentation describes how to do this in templ server side rendering.

In the example below, the http server will render the hello template and serve it at the server root /.

templ hello() {
<div>Hello</div>
}
func (s *Server) Routes() {
...
http.Handle("/", templ.Handler(hello()))
...
}