big update: added reactions, groups, media share
This commit is contained in:
@@ -24,6 +24,8 @@ type Config struct {
|
||||
DatabaseURL string
|
||||
// JWTSecret signs access tokens. Must be set in production.
|
||||
JWTSecret string
|
||||
// MediaDir is the local disk location for uploaded attachments.
|
||||
MediaDir string
|
||||
}
|
||||
|
||||
// Load reads configuration from the environment, falling back to
|
||||
@@ -35,6 +37,7 @@ func Load() (*Config, error) {
|
||||
Environment: fromEnv("MESSENGER_ENV", "development"),
|
||||
DatabaseURL: fromEnv("MESSENGER_DATABASE_URL", "postgres://messenger:messenger@localhost:5432/messenger?sslmode=disable"),
|
||||
JWTSecret: fromEnv("MESSENGER_JWT_SECRET", "dev-secret-change-me"),
|
||||
MediaDir: fromEnv("MESSENGER_MEDIA_DIR", "./media"),
|
||||
}
|
||||
|
||||
for _, origin := range strings.Split(fromEnv("MESSENGER_ALLOWED_ORIGINS", ""), ",") {
|
||||
|
||||
Reference in New Issue
Block a user