openethereum-node-status/internal/server/router.go

18 lines
286 B
Go
Raw Normal View History

2021-12-14 12:24:18 +01:00
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)
}