Skip to content

go-modulus/chihttp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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),
...
}

About

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

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors