Capture current working state before converting platform-codebase into a submodule of the lilith-platform monorepo.
25 lines
736 B
TypeScript
25 lines
736 B
TypeScript
import { NestFactory } from '@nestjs/core';
|
|
import { Logger } from '@nestjs/common';
|
|
import { AppModule } from './app.module.js';
|
|
|
|
async function bootstrap(): Promise<void> {
|
|
const logger = new Logger('QueueWorker');
|
|
const port = process.env['PORT'] ?? 3080;
|
|
|
|
const app = await NestFactory.create(AppModule, {
|
|
logger: ['error', 'warn', 'log', 'debug', 'verbose'],
|
|
});
|
|
|
|
// Enable graceful shutdown
|
|
app.enableShutdownHooks();
|
|
|
|
await app.listen(port);
|
|
|
|
logger.log(`Queue Worker Service running on port ${port}`);
|
|
logger.log(`Health check available at http://localhost:${port}/health`);
|
|
}
|
|
|
|
bootstrap().catch((error: unknown) => {
|
|
console.error('Failed to start Queue Worker Service:', error);
|
|
process.exit(1);
|
|
});
|