add signup resolver
This commit is contained in:
36
server/constants/env.go
Normal file
36
server/constants/env.go
Normal file
@@ -0,0 +1,36 @@
|
||||
package constants
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/joho/godotenv"
|
||||
"github.com/yauthdev/yauth/server/enum"
|
||||
)
|
||||
|
||||
var (
|
||||
DB_TYPE = enum.Postgres
|
||||
DB_URL = "postgresql://localhost:5432/postgres"
|
||||
SMTP_HOST = ""
|
||||
SMTP_PORT = ""
|
||||
SENDER_EMAIL = ""
|
||||
SENDER_PASSWORD = ""
|
||||
JWT_TYPE = ""
|
||||
JWT_SECRET = ""
|
||||
FRONTEND_URL = ""
|
||||
)
|
||||
|
||||
func init() {
|
||||
err := godotenv.Load()
|
||||
if err != nil {
|
||||
log.Println("Error loading .env file")
|
||||
}
|
||||
|
||||
SMTP_HOST = os.Getenv("SMTP_HOST")
|
||||
SMTP_PORT = os.Getenv("SMTP_PORT")
|
||||
SENDER_EMAIL = os.Getenv("SENDER_EMAIL")
|
||||
SENDER_PASSWORD = os.Getenv("SENDER_PASSWORD")
|
||||
JWT_SECRET = os.Getenv("JWT_SECRET")
|
||||
JWT_TYPE = os.Getenv("JWT_TYPE")
|
||||
FRONTEND_URL = os.Getenv("FRONTEND_URL")
|
||||
}
|
Reference in New Issue
Block a user