add: email delivery test; baseURL config
This commit is contained in:
@@ -45,6 +45,7 @@ type TemplateConfig struct {
|
||||
|
||||
type Config struct {
|
||||
ConfigFilePath string `json:"config_file_path" envconfig:"CONFIG_FILE_PATH"`
|
||||
BaseURL string `json:"base_url" envconfig:"BASE_URL"`
|
||||
Auth AuthenticationConfig `json:"auth"`
|
||||
DB DatabaseConfig `json:"db"`
|
||||
Templates TemplateConfig `json:"templates"`
|
||||
@@ -52,6 +53,7 @@ type Config struct {
|
||||
}
|
||||
|
||||
var (
|
||||
BaseURL string
|
||||
CFGPath string
|
||||
CFG Config
|
||||
Auth AuthenticationConfig
|
||||
@@ -83,6 +85,7 @@ func LoadConfig() {
|
||||
DB = CFG.DB
|
||||
Templates = CFG.Templates
|
||||
SMTP = CFG.SMTP
|
||||
BaseURL = CFG.BaseURL
|
||||
}
|
||||
|
||||
// readFile reads the configuration from the specified file path into the provided Config struct.
|
||||
|
||||
Reference in New Issue
Block a user