Advanced
Using as http.Handler
Kocha app can also be used as http.Handler. Use kocha.New instead of kocha.Run.
In main.go
:
if err := kocha.Run(config.AppConfig); err != nil {
panic(err)
}
modifies to:
app, err := kocha.New(config.AppConfig)
if err != nil {
panic(err)
}
log.Fatal(http.ListenAndServe(":9100", app))