Redirect
This commit is contained in:
@@ -18,7 +18,12 @@ func main() {
|
||||
if err != nil {
|
||||
log.Fatalf("Error loading .env file: %v", err)
|
||||
}
|
||||
environ := os.Getenv("ENVIRONMENT")
|
||||
port := os.Getenv("BACKEND_DOCKER_PORT")
|
||||
if environ == "DEV" {
|
||||
port = os.Getenv("BACKEND_PORT")
|
||||
}
|
||||
|
||||
http.HandleFunc("/", handler)
|
||||
fmt.Printf("Serving on port %s\n", port)
|
||||
err = http.ListenAndServe(fmt.Sprintf(":%s", port), nil)
|
||||
|
||||
Reference in New Issue
Block a user