blob: d62ba626be25f9a3d95f98ae595f5adfe648a7d7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package main
import (
"github.com/gin-gonic/contrib/static"
"github.com/gin-gonic/gin"
"github.com/pektezol/leastportals/backend/controllers"
"github.com/pektezol/leastportals/backend/routes"
)
func main() {
if controllers.GetEnvKey("ENV") == "PROD" {
gin.SetMode(gin.ReleaseMode)
}
router := gin.Default()
router.Use(static.Serve("/", static.LocalFile("./frontend/dist", true)))
routes.InitRoutes(router)
router.Run(":4000")
}
|