Macrame/be/app/helper/env-helper.go
Jesse Malotaux b598a090bc Major Update, registration and authentication of devices works now.
This is the first iteration of the registration of devices and authentication for a couple of endpoints.
This needs to be refactored, the code is a bit of a mess. Also because of testing some endpoints are available for remotes that shouldn't be.
2025-04-04 11:27:19 +02:00

16 lines
230 B
Go

package helper
import (
"log"
"os"
"github.com/joho/godotenv"
)
func EnvGet(key string) string {
err := godotenv.Load("../.env")
if err != nil {
log.Fatal("Error loading .env file")
}
return os.Getenv("VITE_" + key)
}