add postgres and refactor code

This commit is contained in:
andrusyakka
2023-07-17 13:59:44 +03:00
parent 94d2a1df2b
commit 6a386e38cf
15 changed files with 107 additions and 47 deletions

View File

@@ -17,7 +17,7 @@ func New() *Config {
return &Config{
Server: ServerConfig{
Port: getEnv("PORT", "8080"),
ConnectionString: getEnv("CONNECTION_STRING", "test.db"),
ConnectionString: getEnv("CONNECTION_STRING", "host=localhost user=astra_users password=password dbname=astra_users_db port=5432 sslmode=disable TimeZone=Europe/Moscow"),
},
}
}