stock-bot/apps/data-service/src/proxy-demo.ts

24 lines
740 B
TypeScript

import { proxyService } from './providers/proxy.tasks.js';
import { getLogger } from '@stock-bot/logger';
// Initialize logger for the demo
const logger = getLogger('proxy-demo');
console.log('🔧 Starting proxy demo...');
/**
* Example: Custom proxy source with enhanced logging
*/
async function demonstrateCustomProxySource() {
console.log('🔧 Demonstrating!');
logger.info('🔧 Demonstrating custom proxy source...');
try {
console.log('🔧 Demonstrating 1');
await proxyService.fetchProxiesFromSources();
console.log('🔧 Demonstrating custom proxy source is DONE!');
} catch (error) {
logger.error('❌ Custom source scraping failed',{
error: error
});
}
}
demonstrateCustomProxySource()