aboutsummaryrefslogtreecommitdiff
path: root/server/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'server/main.go')
-rw-r--r--server/main.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/server/main.go b/server/main.go
index b0d3f9d..9a84f7b 100644
--- a/server/main.go
+++ b/server/main.go
@@ -2,14 +2,16 @@ package main
import (
"github.com/gin-gonic/gin"
- // "net/http"
+ "github.com/gin-gonic/contrib/static"
)
func main() {
- myRouter := gin.New()
- // myRouter.Use(gin.Logger())
+ myRouter := gin.Default()
+ myRouter.Use(gin.Logger())
- myRouter.Static("/app", "./app")
+ // serve static front end on /
+ myRouter.Use(static.Serve("/",
+ static.LocalFile("./app", true)))
myRouter.Run(":8080")
}