Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
func NewServer() *gin.Engine {
RegisterSerializers()
// gin.SetMode(gin.ReleaseMode) // Production mode
srv := gin.New()
srv.Use(RegisterLogger(Logger))
srv.Use(gin.Logger())
srv.Use(RegisterRecovery())
srv.Use(ResisterDatabase())
srv.Use(RegisterSession())
srv.HTMLRender = TemplateRender()
return srv
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.