web-service/apps/auth/src/main.ts

19 lines
438 B
TypeScript

import { NestFactory } from '@nestjs/core';
import { MicroserviceOptions, Transport } from '@nestjs/microservices';
import { AuthModule } from './auth.module';
async function bootstrap() {
const app = await NestFactory.createMicroservice<MicroserviceOptions>(
AuthModule,
{
transport: Transport.NATS,
options: {
servers: ['nats://localhost:4222'],
},
},
);
await app.listen();
}
bootstrap();