Skip to content

第15天練習問題 #2

Description

@zerox12311

您好,我在看您的第15天的練習,但是遇到些問題
我的專案是用cli建立的,版本是4.0.0-rc2,以下是main.ts
async function bootstrap() { const app = await NestFactory.create(ApplicationModule); app.connectMicroservice({ transport: Transport.TCP, strategy: new RabbitMQServer('XXX', 'example') }); console.log('start1'); await app.startAllMicroservicesAsync(); console.log('start2'); await app .listen(3001) .then(() => { console.log('MicroService is starting.'); }) .catch((error) => { console.error('Something wrong happened,', error); }); } bootstrap();

啟動Server後發現會卡在await app.startAllMicroservicesAsync();這步驟,console.log只會印出start1
不知道該如何解決呢??

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions