2022-07-25 04:38:48 +00:00
|
|
|
import { NestFactory } from '@nestjs/core';
|
|
|
|
import { Transport } from '@nestjs/microservices';
|
|
|
|
import { AppModule } from './app.module';
|
|
|
|
import { Logger } from '@nestjs/common';
|
2022-07-01 23:11:32 +00:00
|
|
|
|
|
|
|
const logger = new Logger();
|
2022-07-01 03:02:17 +00:00
|
|
|
|
|
|
|
async function bootstrap() {
|
2022-07-01 23:11:32 +00:00
|
|
|
const app = await NestFactory.createMicroservice(AppModule, {
|
|
|
|
transport: Transport.TCP,
|
|
|
|
options: {
|
2022-07-25 04:38:48 +00:00
|
|
|
host: '127.0.0.1',
|
|
|
|
port: 3008,
|
|
|
|
},
|
2022-07-01 23:11:32 +00:00
|
|
|
});
|
2022-07-25 04:38:48 +00:00
|
|
|
app.listen().then(() => logger.log('Microservice Reportes is listening'));
|
2022-07-01 03:02:17 +00:00
|
|
|
}
|
2022-07-25 04:38:48 +00:00
|
|
|
bootstrap();
|