const bootstrap = async () => { const app = await NestFactory.create(AppModule, {cors: true}); app.useWebSocketAdapter(new RedisIoAdapter(app)); app.setGlobalPrefix('api'); app.connectMicroservice<MicroserviceOptions>({ transport: Transport.GRPC, options: { url: process.env.GRPC_SERVER_URL, package: 'live', protoPath: process.cwd() + "/src/core/shared/proto/live.proto", }, }); await app.startAllMicroservicesAsync(); await app.listen(process.env.SERVER_PORT, () => { Logger.log(`Server running on http://localhost:${process.env.SERVER_PORT}`, 'Bootstrap'); }); await createPeerServer(); }
transport: Transport.GRPC, options: { url: process.env.MICRO_LIVE_GENERATOR_GRPC_URL,