diff options
Diffstat (limited to 'application_router.go')
-rw-r--r-- | application_router.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/application_router.go b/application_router.go index ea68e9d..bd876da 100644 --- a/application_router.go +++ b/application_router.go @@ -3,6 +3,7 @@ package main import ( "errors" "fmt" + "github.com/gin-gonic/contrib/static" "github.com/gin-gonic/gin" log "github.com/sirupsen/logrus" "net/http" @@ -17,7 +18,7 @@ func CreateApplicationRouter(applicationContext *ApplicationContext) *gin.Engine router.Use(gin.Recovery()) router.MaxMultipartMemory = 8 << 30 - // engine.Static("/", "./frontend/build") + router.Use(static.Serve("/", static.LocalFile("./frontend/build", true))) router.POST("/setup", func(c *gin.Context) { if applicationContext.IsConfigured { @@ -280,6 +281,8 @@ func CreateApplicationRouter(applicationContext *ApplicationContext) *gin.Engine }) } + + return router } |