1234567891011121314151617181920212223242526 |
- import { NestFactory } from '@nestjs/core';
- import { MicroserviceOptions, Transport } from '@nestjs/microservices';
- import { ConfigService } from '@nestjs/config';
- import 'dotenv/config'
- import { FisFingerprintModule } from './fis-fingerprint.module';
- async function bootstrap() {
- const host: string = process.env.HOST as unknown as string
- const port: number = process.env.FINGERPRINT_TCP_PORT as unknown as number
- const app = await NestFactory.createMicroservice<MicroserviceOptions>(
- FisFingerprintModule,
- {
- transport: Transport.TCP,
- options: {
- host: host,
- port: port,
- retryAttempts: 5,
- retryDelay: 3000
- },
- }
- );
- await app.listen()
- console.log(`Fingerprint microsservice is running on ${host}:${port}`);
- }
- bootstrap();
|