- Add TokenCard and CexAnalysisCard components for displaying token data - Implement real-time Redis event streaming for token updates - Add environment-based configuration system for dev/prod Redis servers - Create comprehensive hunting ground dashboard with card management - Add individual and bulk card removal functionality - Implement browser integration for token details viewing - Add timestamp utilities and proper type handling for Redis events - Create production-ready configuration with 154.38.185.112 Redis server - Add comprehensive documentation in README.md and CONTRIBUTORS.md - Restructure project architecture with proper Electron-Vue integration BREAKING CHANGE: Redis configuration now uses environment-based settings
50 lines
No EOL
1.1 KiB
TypeScript
50 lines
No EOL
1.1 KiB
TypeScript
/**
|
|
* Redis Configuration for different environments
|
|
*/
|
|
import { ENV_CONFIG } from './environment';
|
|
|
|
export interface RedisConfig {
|
|
host: string;
|
|
port: number;
|
|
lazyConnect: boolean;
|
|
retryDelayOnFailover: number;
|
|
maxRetriesPerRequest: number;
|
|
connectTimeout: number;
|
|
}
|
|
|
|
/**
|
|
* Environment-based Redis configuration
|
|
*/
|
|
const getRedisConfig = (): RedisConfig => {
|
|
return {
|
|
host: ENV_CONFIG.redis.host,
|
|
port: ENV_CONFIG.redis.port,
|
|
lazyConnect: true,
|
|
retryDelayOnFailover: 100,
|
|
maxRetriesPerRequest: 3,
|
|
connectTimeout: 10000,
|
|
};
|
|
};
|
|
|
|
/**
|
|
* Channels to subscribe to
|
|
*/
|
|
export const REDIS_CHANNELS = [
|
|
'new_token_created',
|
|
'token_cex_updated',
|
|
'max_depth_reached',
|
|
] as const;
|
|
|
|
/**
|
|
* Get the current Redis configuration
|
|
*/
|
|
export const REDIS_CONFIG = getRedisConfig();
|
|
|
|
/**
|
|
* Log current configuration (without sensitive data)
|
|
*/
|
|
export const logRedisConfig = (): void => {
|
|
const env = process.env.NODE_ENV || 'development';
|
|
console.info(`[REDIS] Environment: ${env}`);
|
|
console.info(`[REDIS] Connecting to: ${REDIS_CONFIG.host}:${REDIS_CONFIG.port}`);
|
|
};
|