mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 11:43:22 +02:00
Fixed env vars init emplacement
This commit is contained in:
+9
-4
@@ -10,15 +10,20 @@ import (
|
|||||||
"github.com/joho/godotenv"
|
"github.com/joho/godotenv"
|
||||||
)
|
)
|
||||||
|
|
||||||
var ginMode = os.Getenv("APP_GIN_MODE")
|
var ginMode string
|
||||||
var apiPort = os.Getenv("APP_API_PORT")
|
var apiPort string
|
||||||
var frontPort = os.Getenv("APP_FRONT_PORT")
|
var frontPort string
|
||||||
var hostAddress = os.Getenv("APP_HOST_ADDRESS")
|
var hostAddress string
|
||||||
|
|
||||||
func initEnvVariables() {
|
func initEnvVariables() {
|
||||||
if godotenv.Load() != nil {
|
if godotenv.Load() != nil {
|
||||||
panic("Error loading .env file.")
|
panic("Error loading .env file.")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ginMode = os.Getenv("APP_GIN_MODE")
|
||||||
|
apiPort = os.Getenv("APP_API_PORT")
|
||||||
|
frontPort = os.Getenv("APP_FRONT_PORT")
|
||||||
|
hostAddress = os.Getenv("APP_HOST_ADDRESS")
|
||||||
}
|
}
|
||||||
|
|
||||||
func initJWT() {
|
func initJWT() {
|
||||||
|
|||||||
Reference in New Issue
Block a user