混合应用
It's possible to connect infinite count of microservices to your existing Nest web application.
可能会在你现有的Nest web应用程序中上连接无数微服务。
Example:
示例:
const app = NestFactory.create(ApplicationModule);
const microservice = app.connectMicroservice({
transport: Transport.TCP,
});
app.startAllMicroservices(() => console.log('All microservices are listening...'));
app.listen(port, () => console.log('Application listen on port:', port));