Configure the build and the start of the app in prod. Updating to version 0.1.1

This commit is contained in:
2023-10-07 00:55:40 +00:00
parent ec020257e0
commit 3ea012cf93
6 changed files with 26 additions and 20 deletions

View File

@ -8,6 +8,7 @@ import (
func LoadEnv() {
err := godotenv.Load("../../.env")
if err != nil {
log.Fatal("Error loading .env file")
// log.Fatal("Error loading .env file")
log.Println("Is no .env file")
}
}

View File

@ -21,6 +21,10 @@ func main() {
//Getting the port from the environment
port := os.Getenv("PORT")
if(port == "") {
port = "80"
}
paths := utils.GetRoutes()
e := echo.New()