I was deploying by backend written in go gin gonic but every time it is showing cant read env file I have added the env variables in dashboard even but still error persists
package main
import (
“log”
“net/http”
“os”
“server/routes”
"github.com/gin-gonic/gin"
)
func main() {
gin.SetMode(gin.ReleaseMode)
port := os.Getenv("PORT")
if port == "" {
port = "10000"
}
router := gin.Default()
router.Use(gin.Logger())
router.Use(CORSMiddleware())
routes.AuthRoutes(router)
routes.DataRoutes(router)
router.GET("/working", working)
if err := router.Run(":" + port); err != nil {
log.Panicf("error: %s", err)
}
}