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