gotta set the dumb ass release mode before
This commit is contained in:
parent
e6d4abf292
commit
2641a40f71
1 changed files with 4 additions and 4 deletions
|
@ -29,15 +29,15 @@ func RunWeb(config *config.Config) {
|
||||||
Timeout: 10 * time.Second,
|
Timeout: 10 * time.Second,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !config.Debug {
|
||||||
|
gin.SetMode(gin.ReleaseMode)
|
||||||
|
}
|
||||||
|
|
||||||
r := gin.Default()
|
r := gin.Default()
|
||||||
r.Use(gin.Recovery())
|
r.Use(gin.Recovery())
|
||||||
r.Use(static.Serve("/static", static.LocalFile("web/static", false)))
|
r.Use(static.Serve("/static", static.LocalFile("web/static", false)))
|
||||||
r.Use(sessions.Sessions("mysession", sessions.NewCookieStore([]byte(config.Web.SessionSecret))))
|
r.Use(sessions.Sessions("mysession", sessions.NewCookieStore([]byte(config.Web.SessionSecret))))
|
||||||
|
|
||||||
if !config.Debug {
|
|
||||||
gin.SetMode(gin.ReleaseMode)
|
|
||||||
}
|
|
||||||
|
|
||||||
r.HTMLRender = ginview.New(goview.Config{
|
r.HTMLRender = ginview.New(goview.Config{
|
||||||
Root: "web/templates",
|
Root: "web/templates",
|
||||||
DisableCache: config.Debug,
|
DisableCache: config.Debug,
|
||||||
|
|
Loading…
Reference in a new issue