cic-chain-events/cmd/service/api.go
Mohammed Sohail 2bbc05bb45
major refactor: sig ch, remove conf settings, jetstream pub, ci
* This is a major refactor and includes general improvements around

- context cancellation
- build settings
- jetstream pub sub
- logging
- docker builds
- conf loading
2023-03-08 14:30:40 +00:00

22 lines
379 B
Go

package main
import (
"github.com/VictoriaMetrics/metrics"
"github.com/labstack/echo/v4"
)
func initApiServer() *echo.Echo {
server := echo.New()
server.HideBanner = true
server.HidePort = true
if ko.Bool("metrics.go_process") {
server.GET("/metrics", func(c echo.Context) error {
metrics.WritePrometheus(c.Response(), true)
return nil
})
}
return server
}