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