18 lines
286 B
Go
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)
|
|
}
|