Skip to content
/ chi Public

(Under development) Chi driver for Goravel

License

Notifications You must be signed in to change notification settings

goravel/chi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chi

Doc Go Release Test Report Card Codecov License

Chi http driver for Goravel.

Version

goravel/chi goravel/framework
v1.0.x v1.15.x

Install

  1. Add package
go get -u github.com/goravel/chi
  1. Register service provider
// config/app.go
import "github.com/goravel/chi"

"providers": []foundation.ServiceProvider{
    ...
    &chi.ServiceProvider{},
}
  1. Add chi config to config/http.go file
// config/http.go
import (
    "html/template"

    chifacades "github.com/goravel/chi/facades"
    "github.com/goravel/chi"
)

"default": "chi",

"drivers": map[string]any{
    "chi": map[string]any{
        // Optional, default is 4096 KB
        "body_limit": 4096,
        "header_limit": 4096,
        "route": func() (route.Route, error) {
            return chifacades.Route(), nil
        },
        // Optional, default is http/template
        "template": func() (*template.Template, error) {
            return new(template.Template), nil
        },
    },
},

Testing

Run command below to run test:

go test ./...

About

(Under development) Chi driver for Goravel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages