23 lines
532 B
TypeScript
23 lines
532 B
TypeScript
import { NestFactory } from '@nestjs/core';
|
|
import { Transport } from '@nestjs/microservices';
|
|
import { AppModule } from './app.module';
|
|
import { Logger } from '@nestjs/common';
|
|
|
|
const logger = new Logger();
|
|
|
|
async function bootstrap() {
|
|
const app = await NestFactory.createMicroservice(AppModule, {
|
|
transport: Transport.TCP,
|
|
options: {
|
|
host: '127.0.0.1',
|
|
port: 3002,
|
|
},
|
|
});
|
|
app
|
|
.listen()
|
|
.then(() =>
|
|
logger.log('Microservice Comunidades de vivienda is listening'),
|
|
);
|
|
}
|
|
bootstrap();
|