The bundle provide a Echo integration to GoZix application.
go get github.com/gozix/echo/v4{
"echo": {
"admin": {
"host": "0.0.0.0",
"port": 8080,
"level": "debug",
"debug": false,
"hide_banner": true,
"hide_port": false
},
"public": {
"host": "0.0.0.0",
"port": 8081,
"static": {
"prefix": "/",
"root": ""
},
"level": "info",
"debug": false,
"hide_banner": true,
"hide_port": false
},
"private": {
"port": 8082,
"...": "..."
},
"...": {}
}
}Without server names the http-server command runs all servers from the echo config section:
gzEcho.NewBundle()With server names the command runs only these servers and fails if any of them is not configured:
gzEcho.NewBundle("admin", "public", "private")To get a server echo instance outside the http-server command, use the factory:
func NewRoutesCommand(f *gzEcho.Factory) *cobra.Command {
// ...
var e, err = f.Echo("admin")
// ...
}You can find documentation on pkg.go.dev and read source code if needed.
If you have any questions, feel free to create an issue.