presumably working basic routing + db queries

This commit is contained in:
Dmitry Chumak
2025-05-28 20:43:37 +05:00
parent b47e0d3445
commit 5ed47a796f
5 changed files with 106 additions and 70 deletions

23
config/config.go Normal file
View File

@@ -0,0 +1,23 @@
package config
import "os"
type Config struct {
DB struct {
DSN string
}
JWT struct {
Secret string
}
}
func GetCfg() Config {
return Config{
DB: struct{ DSN string }{
DSN: os.Getenv("DB_DSN"),
},
JWT: struct{ Secret string }{
Secret: os.Getenv("JWT_SECRET"),
},
}
}