diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 4 |
1 files changed, 4 insertions, 0 deletions
| @@ -1,8 +1,10 @@ | |||
| 1 | package main | 1 | package main |
| 2 | 2 | ||
| 3 | import ( | 3 | import ( |
| 4 | "github.com/gin-gonic/contrib/static" | ||
| 4 | "github.com/gin-gonic/gin" | 5 | "github.com/gin-gonic/gin" |
| 5 | "github.com/pektezol/leastportals/backend/controllers" | 6 | "github.com/pektezol/leastportals/backend/controllers" |
| 7 | "github.com/pektezol/leastportals/backend/routes" | ||
| 6 | ) | 8 | ) |
| 7 | 9 | ||
| 8 | func main() { | 10 | func main() { |
| @@ -10,5 +12,7 @@ func main() { | |||
| 10 | gin.SetMode(gin.ReleaseMode) | 12 | gin.SetMode(gin.ReleaseMode) |
| 11 | } | 13 | } |
| 12 | router := gin.Default() | 14 | router := gin.Default() |
| 15 | router.Use(static.Serve("/", static.LocalFile("./frontend/dist", true))) | ||
| 16 | routes.InitRoutes(router) | ||
| 13 | router.Run(":4000") | 17 | router.Run(":4000") |
| 14 | } | 18 | } |