- 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
63 lines
No EOL
1.2 KiB
TypeScript
63 lines
No EOL
1.2 KiB
TypeScript
/**
|
|
* Environment Configuration
|
|
* This handles different configurations for development and production builds
|
|
*/
|
|
|
|
export interface EnvironmentConfig {
|
|
redis: {
|
|
host: string;
|
|
port: number;
|
|
};
|
|
app: {
|
|
name: string;
|
|
version: string;
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Development Configuration
|
|
*/
|
|
const developmentConfig: EnvironmentConfig = {
|
|
redis: {
|
|
host: 'localhost', // or 'bismillahdao-redis' if using Docker
|
|
port: 6379,
|
|
},
|
|
app: {
|
|
name: 'Ziya Token Monitor (Dev)',
|
|
version: '1.0.0-dev',
|
|
},
|
|
};
|
|
|
|
/**
|
|
* Production Configuration
|
|
*/
|
|
const productionConfig: EnvironmentConfig = {
|
|
redis: {
|
|
host: '154.38.185.112', // Your production Redis server
|
|
port: 6379,
|
|
},
|
|
app: {
|
|
name: 'Ziya Token Monitor',
|
|
version: '1.0.0',
|
|
},
|
|
};
|
|
|
|
/**
|
|
* Get configuration based on NODE_ENV
|
|
*/
|
|
export const getEnvironmentConfig = (): EnvironmentConfig => {
|
|
const isProduction = process.env.NODE_ENV === 'production';
|
|
|
|
if (isProduction) {
|
|
console.info('[CONFIG] Using production configuration');
|
|
return productionConfig;
|
|
} else {
|
|
console.info('[CONFIG] Using development configuration');
|
|
return developmentConfig;
|
|
}
|
|
};
|
|
|
|
/**
|
|
* Current environment configuration
|
|
*/
|
|
export const ENV_CONFIG = getEnvironmentConfig();
|