Added backend
This commit is contained in:
28
backend/config/config.go
Normal file
28
backend/config/config.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"github.com/joho/godotenv"
|
||||
"os"
|
||||
)
|
||||
|
||||
var (
|
||||
ServerPort string
|
||||
|
||||
Address string
|
||||
SubPath string
|
||||
|
||||
DatabaseFile string
|
||||
FrontendDir string
|
||||
)
|
||||
|
||||
func init() {
|
||||
godotenv.Load()
|
||||
|
||||
ServerPort = os.Getenv("SERVER_PORT")
|
||||
|
||||
Address = os.Getenv("ADDRESS")
|
||||
SubPath = os.Getenv("SUBPATH")
|
||||
|
||||
DatabaseFile = os.Getenv("DATABASE_FILE")
|
||||
FrontendDir = os.Getenv("FRONTEND_DIR")
|
||||
}
|
||||
Reference in New Issue
Block a user