chihttp

package module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 7 Imported by: 0

README

http

HTTP module for the Modulus framework. It is based on the Chi router.

How to use:

  1. Install mtools
go install github.com/go-modulus/mtools/cmd/mtools@latest
  1. Init a project
mtools init
  1. Add http module
mtools module install -m "modulus/chihttp"

or use just mtools module install and select modulus/chihttp module in the list.

Add a module option OverrideHttpRouter to the http module constructor inside the entrypoint of your application.

For example, in /cmd/conosle/main.go

// DO NOT Remove. It will be edited by the `mtools module create` CLI command.
	modules := []*module.Module{
		http.NewModule(chihttp.OverrideHttpRouter),
...
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewManifesto

func NewManifesto() module.Manifesto

func NewModule

func NewModule() *module.Module

func NewRouter

func NewRouter(errorPipeline *errhttp.ErrorPipeline, config http2.ServeConfig) chi.Router

func OverrideHttpRouter

func OverrideHttpRouter(m *module.Module) *module.Module

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL