test(app): added production into the build so we dont fill logs up
This commit is contained in:
@@ -21,6 +21,7 @@ func main() {
|
|||||||
|
|
||||||
// Set basePath dynamically
|
// Set basePath dynamically
|
||||||
basePath := "/"
|
basePath := "/"
|
||||||
|
|
||||||
if os.Getenv("APP_ENV") != "production" {
|
if os.Getenv("APP_ENV") != "production" {
|
||||||
basePath = "/lst" // Dev only
|
basePath = "/lst" // Dev only
|
||||||
}
|
}
|
||||||
@@ -29,6 +30,10 @@ func main() {
|
|||||||
fmt.Println("Welcome to lst backend where all the fun happens.")
|
fmt.Println("Welcome to lst backend where all the fun happens.")
|
||||||
r := gin.Default()
|
r := gin.Default()
|
||||||
|
|
||||||
|
if os.Getenv("APP_ENV") == "production" {
|
||||||
|
gin.SetMode(gin.ReleaseMode)
|
||||||
|
}
|
||||||
|
|
||||||
// // --- Add Redirects Here ---
|
// // --- Add Redirects Here ---
|
||||||
// // Redirect root ("/") to "/app" or "/lst/app"
|
// // Redirect root ("/") to "/app" or "/lst/app"
|
||||||
// r.GET("/", func(c *gin.Context) {
|
// r.GET("/", func(c *gin.Context) {
|
||||||
|
|||||||
Reference in New Issue
Block a user