Hybrid application

Hybrid application

ν•˜μ΄λΈŒλ¦¬λ“œ μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ€ HTTP μš”μ²­μ„ μ²­μ·¨ν•˜κ³  μ—°κ²°λœ 마이크둜 μ„œλΉ„μŠ€λ₯Ό μ‚¬μš©ν•˜λŠ” μ• ν”Œλ¦¬μΌ€μ΄μ…˜μž…λ‹ˆλ‹€. INestApplication은 connectMicroservice()λ©”μ†Œλ“œλ₯Ό 톡해 λ¬΄ν•œν•œ 수의 INestMicroservice μΈμŠ€ν„΄μŠ€μ™€ 결합될 수 μžˆμŠ΅λ‹ˆλ‹€.

const app = await NestFactory.create(ApplicationModule);
const microservice = app.connectMicroservice({
  transport: Transport.TCP,
});

await app.startAllMicroservicesAsync();
await app.listen(3001);

Last updated