// Start will start a gin server
Start will start a gin server
// Start will start a gin server
func Start() {
	gin.SetMode(viper.GetString("runmode"))
	server := gin.New()
	server.Use(middleware.RequestID())
	server.Use(middleware.GinLogger())
	server.Use(gin.Recovery())
	healthCheck(server)
	server.GET("/ok", func(c *gin.Context) {
		c.Status(http.StatusOK)
	})
	server.GET("/fatal", func(c *gin.Context) {
		c.Status(http.StatusInternalServerError)
	})
	server.Use(middleware.Authenticate())
	server.GET("/secret", func(c *gin.Context) {
		c.Status(http.StatusInternalServerError)
	})
	server.Run(viper.GetString("addr"))
}
func Start ( ) { gin . SetMode ( viper . GetString ( " " ) ) server := gin . New ( ) server . Use ( middleware . RequestID ( ) ) server . Use ( middleware . GinLogger ( ) ) server . Use ( gin . Recovery ( ) ) healthCheck ( server ) server . GET ( " " , func ( c * gin . Context ) { c . Status ( http . StatusOK ) } ) server . GET ( " " , func ( c * gin . Context ) { c . Status ( http . StatusInternalServerError ) } ) server . Use ( middleware . Authenticate ( ) ) server . GET ( " " , func ( c * gin . Context ) { c . Status ( http . StatusInternalServerError ) } ) server . Run ( viper . GetString ( " " ) ) }
Start will start a gin server
Start will start a gin server
// By default it serves on :8080 unless a // PORT environment variable was defined.