Files
backend/config/config.go

29 lines
433 B
Go

package config
import (
"github.com/joho/godotenv"
"os"
)
var (
ArticleRoot string
ServerPort string
DatabaseFile string
ArticleTemplate string
FrontendDir string
)
func init() {
godotenv.Load()
ArticleRoot = os.Getenv("ARTICLE_ROOT")
ServerPort = os.Getenv("SERVER_PORT")
DatabaseFile = os.Getenv("DATABASE_FILE")
ArticleTemplate = os.Getenv("ARTICLE_TEMPLATE")
FrontendDir = os.Getenv("FRONTEND_DIR")
}