openethereum-node-status/internal/server/router.go
2021-12-14 14:24:18 +03:00

18 lines
286 B
Go

package server
import (
"github.com/gin-gonic/gin"
)
func Start(port string, ginMode string) error {
gin.SetMode(ginMode)
gin.DisableConsoleColor()
router := gin.Default()
router.GET("/metrics", metricsHandler)
router.GET("/health", healthHandler)
return router.Run(port)
}