From 302752a7f023256a5c992364a471dd7baef6ce3a Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Wed, 23 Nov 2022 18:27:39 +0800 Subject: [PATCH] no route --- main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.go b/main.go index 3aa1716..30fba11 100644 --- a/main.go +++ b/main.go @@ -47,6 +47,10 @@ var wsUpgrader = websocket.Upgrader{ func main() { r := gin.Default() + r.NoRoute(func(c *gin.Context) { + c.File("./web/build/index.html") + }) + group := r.Group("/") group.StaticFile("/", "./web/build/index.html")