feat: add websocket
This commit is contained in:
@@ -77,6 +77,18 @@ type Config struct {
|
||||
GoogleOAuthClientSecret string
|
||||
FacebookOAuthClientID string
|
||||
FacebookOAuthClientSecret string
|
||||
|
||||
// Soketi (Pusher-compatible WebSocket server) — used to push realtime
|
||||
// notifications. Empty App credentials disable realtime delivery (the
|
||||
// DB row + email still happen). SoketiHost is the HTTP-API origin the
|
||||
// BFF triggers events against (e.g. "ws.prabhupadasays.org"); the
|
||||
// frontend connects to the same host over WSS.
|
||||
SoketiAppID string
|
||||
SoketiAppKey string
|
||||
SoketiAppSecret string
|
||||
SoketiHost string
|
||||
SoketiPort int
|
||||
SoketiUseTLS bool
|
||||
}
|
||||
|
||||
// Load reads configuration from environment variables (with .env fallback).
|
||||
@@ -135,6 +147,13 @@ func Load() (*Config, error) {
|
||||
GoogleOAuthClientSecret: getEnv("GOOGLE_OAUTH_CLIENT_SECRET", ""),
|
||||
FacebookOAuthClientID: getEnv("FACEBOOK_OAUTH_CLIENT_ID", ""),
|
||||
FacebookOAuthClientSecret: getEnv("FACEBOOK_OAUTH_CLIENT_SECRET", ""),
|
||||
|
||||
SoketiAppID: getEnv("SOKETI_APP_ID", ""),
|
||||
SoketiAppKey: getEnv("SOKETI_APP_KEY", ""),
|
||||
SoketiAppSecret: getEnv("SOKETI_APP_SECRET", ""),
|
||||
SoketiHost: getEnv("SOKETI_HOST", "ws.prabhupadasays.org"),
|
||||
SoketiPort: getEnvInt("SOKETI_PORT", 443),
|
||||
SoketiUseTLS: getEnvBool("SOKETI_USE_TLS", true),
|
||||
}
|
||||
|
||||
if cfg.MongoURI == "" {
|
||||
|
||||
Reference in New Issue
Block a user