Phase 1-14 complete: - Unified Express.js API (TypeScript, Prisma ORM, PostgreSQL 16) - React Admin GUI (Vite + Ant Design + Zustand) - JWT auth with refresh tokens - Influence: Campaigns, Representatives, Responses, Email Queue - Map: Locations, Cuts, Shifts, Canvassing System - NAR data import infrastructure (2025 format) - Listmonk newsletter integration - Landing page builder (GrapesJS) - MkDocs + Code Server integration - Volunteer portal with GPS tracking - Monitoring stack (Prometheus, Grafana, Alertmanager) - Pangolin tunnel integration Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
21 lines
452 B
TypeScript
21 lines
452 B
TypeScript
import Redis from 'ioredis';
|
|
import { env } from './env';
|
|
import { logger } from '../utils/logger';
|
|
|
|
export const redis = new Redis(env.REDIS_URL, {
|
|
maxRetriesPerRequest: null,
|
|
enableReadyCheck: true,
|
|
retryStrategy(times) {
|
|
const delay = Math.min(times * 50, 2000);
|
|
return delay;
|
|
},
|
|
});
|
|
|
|
redis.on('connect', () => {
|
|
logger.info('Redis connected');
|
|
});
|
|
|
|
redis.on('error', (err) => {
|
|
logger.error('Redis connection error:', err);
|
|
});
|