Skip to content
/ muxt Public

Generate HTTP Endpoints from HTML Templates

License

Notifications You must be signed in to change notification settings

crhntr/muxt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Muxt Go Reference Go

Muxt is a Go code generator that helps you build server-side rendered web apps with minimal overhead, leveraging Go 1.22’s improved http.ServeMux and standard html/template features. No extra runtime dependencies are required—just plain Go code.

  • It allows you to register HTTP routes from HTML templates
  • It generates handler functions and registers them on an *http.ServeMux
  • It generates code in handler functions to parse path parameters and form fields
  • It generates a receiver interface to represent the boundary between your app code and HTTP/HTML
    • Use this to mock out your server and test the view layer of your application

Examples

The example directory has a worked example.

For a more complete example, see: https://github.com/crhntr/muxt-template-module-htmx

Documentation

Introduction

Reference

Testing

Philosophy & Vision

Used By