INNER CODE UNIT · TypeScript
bootstrap
tkssharma/nestjs-microservices · apps/nestjs-rmq-auth-service/src/main.ts:10
async function bootstrap() {
const app = await NestFactory.createMicroservice(TokenModule, {
transport: Transport.GRPC,
options: {
url: `${new ConfigService().get().authService.options.host}:${
new ConfigService().get().authService.options.port
}`,
package: 'auth',
protoPath: join(__dirname, './_proto/auth.proto'),
loaders: {
enums: String,
objects: true,
arrays: true,
},
},
} as GrpcOptions);
await app.listen();
}