mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-20 11:53:40 +02:00
NestJS notification microservice for email, push, Matrix, and webhook notifications across all ManaCore apps. Features: - Multi-channel delivery (email, push, Matrix, webhook) - Handlebars template engine with defaults - User notification preferences - BullMQ async job processing - Delivery tracking and logging - Prometheus metrics Includes @manacore/notify-client package for NestJS integration.
44 lines
1.2 KiB
TypeScript
44 lines
1.2 KiB
TypeScript
export default () => ({
|
|
port: parseInt(process.env.PORT || '3040', 10),
|
|
nodeEnv: process.env.NODE_ENV || 'development',
|
|
|
|
database: {
|
|
url: process.env.DATABASE_URL || 'postgresql://manacore:devpassword@localhost:5432/manacore',
|
|
},
|
|
|
|
redis: {
|
|
host: process.env.REDIS_HOST || 'localhost',
|
|
port: parseInt(process.env.REDIS_PORT || '6379', 10),
|
|
},
|
|
|
|
auth: {
|
|
serviceKey: process.env.SERVICE_KEY || 'dev-service-key',
|
|
manaCoreAuthUrl: process.env.MANA_CORE_AUTH_URL || 'http://localhost:3001',
|
|
},
|
|
|
|
smtp: {
|
|
host: process.env.SMTP_HOST || 'smtp-relay.brevo.com',
|
|
port: parseInt(process.env.SMTP_PORT || '587', 10),
|
|
user: process.env.SMTP_USER,
|
|
password: process.env.SMTP_PASSWORD,
|
|
from: process.env.SMTP_FROM || 'ManaCore <noreply@mana.how>',
|
|
},
|
|
|
|
push: {
|
|
expoAccessToken: process.env.EXPO_ACCESS_TOKEN,
|
|
},
|
|
|
|
matrix: {
|
|
homeserverUrl: process.env.MATRIX_HOMESERVER_URL,
|
|
accessToken: process.env.MATRIX_ACCESS_TOKEN,
|
|
},
|
|
|
|
rateLimits: {
|
|
emailPerMinute: parseInt(process.env.RATE_LIMIT_EMAIL_PER_MINUTE || '10', 10),
|
|
pushPerMinute: parseInt(process.env.RATE_LIMIT_PUSH_PER_MINUTE || '100', 10),
|
|
},
|
|
|
|
cors: {
|
|
origins: process.env.CORS_ORIGINS?.split(',') || ['http://localhost:*'],
|
|
},
|
|
});
|