first commit

This commit is contained in:
dahyeon committed 2025-11-08 18:27:51 +09:00
commit c809bb3893
40 files changed
+3836

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
import { secrets } from './secret-manager.js';
import { MinioClient } from './minio.js';
import { NatsClient } from './nats.js';
import { FFmpegConverter } from './ffmpeg.js';
import { ImageDerivativesGenerator } from './image-derivaties-generator.js';
async function main() {
try {
console.log('🔐 Secrets loaded');
console.log(secrets);
// Initialize clients
const minioClient = new MinioClient();
const natsClient = new NatsClient();
const ffmpegConverter = new FFmpegConverter();
// Connect to NATS
await natsClient.connect();
// Create and start the service
const generator = new ImageDerivativesGenerator(minioClient, natsClient, ffmpegConverter);
await generator.start();
// Handle graceful shutdown
const shutdown = async () => {
await generator.stop();
process.exit(0);
};
process.on('SIGINT', shutdown);
process.on('SIGTERM', shutdown);
}
catch (error) {
console.error('❌ Failed to start service:', error);
process.exit(1);
}
}
main();
//# sourceMappingURL=main.js.map