ft/add swagger env

This commit is contained in:
itsscb 2023-11-15 20:12:20 +01:00
parent 3bab35d06a
commit 6e60beefbf
3 changed files with 3 additions and 1 deletions

View File

@ -7,6 +7,7 @@ LOG_OUTPUT=text
ACCESS_TOKEN_DURATION=15m
MIGRATION_URL=file://db/migration
MIGRATION_RETRIES=5
SWAGGER=true
REFRESH_TOKEN_DURATION=24h
TOKEN_PRIVATEKEY_HEX=099c0b96725b99e95719c92aec580809ac58fc14be2105ed2656f1f6c464593d8cacd6c7bed924b9cf207ab3cff1c59be4e5865260c4dafa29699244bd4ea2de
SMTP_ADDRESS=smtp.gmail.com:587

View File

@ -46,7 +46,7 @@ func main() {
store := db.NewStore(conn)
if config.Environment == "development" {
if config.Swagger {
subDir, err := fs.Sub(swaggerFiles, "doc/swagger")
if err != nil {
log.Fatalf("could not import swagger files")

View File

@ -15,6 +15,7 @@ type Config struct {
LogOutput string `mapstructure:"LOG_OUTPUT"`
TokenPrivateKeyHex string `mapstructure:"TOKEN_PRIVATEKEY_HEX"`
MigrationURL string `mapstructure:"MIGRATION_URL"`
Swagger bool `mapstructure:"SWAGGER"`
SMTPAddress string `mapstructure:"SMTP_ADDRESS"`
SMTPPassword string `mapstructure:"SMTP_PASSWORD"`
SMTPMail string `mapstructure:"SMTP_MAIL"`