Hybrid application

The hybrid application is an application that listens to HTTP requests,as well as makes use of the connected microservices. The INestApplication can be combined with the endless number of the INestMicroservice instances through connectMicroservice() method.

  1. const app = await NestFactory.create(ApplicationModule);
  2. const microservice = app.connectMicroservice({
  3. transport: Transport.TCP,
  4. });
  5. await app.startAllMicroservicesAsync();
  6. await app.listen(3001);