From 256d83c3f98be9b87eca877864183a42e11b87e2 Mon Sep 17 00:00:00 2001 From: Hot Pixel Group Date: Mon, 1 Apr 2019 13:23:33 -0500 Subject: [PATCH] refactor(nx): modifies log for NestJS apps to reflect global prefix (#1201) Clears confusion from console.log on NestJS apps when bootstrapped re #1132 --- .../collection/node-application/files/nestjs/main.ts__tmpl__ | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/schematics/src/collection/node-application/files/nestjs/main.ts__tmpl__ b/packages/schematics/src/collection/node-application/files/nestjs/main.ts__tmpl__ index aa2971eb81..8e48cab7d0 100644 --- a/packages/schematics/src/collection/node-application/files/nestjs/main.ts__tmpl__ +++ b/packages/schematics/src/collection/node-application/files/nestjs/main.ts__tmpl__ @@ -9,10 +9,11 @@ import { AppModule } from './app/app.module'; async function bootstrap() { const app = await NestFactory.create(AppModule); - app.setGlobalPrefix(`api`); + const globalPrefix = 'api'; + app.setGlobalPrefix(globalPrefix); const port = process.env.port || 3333; await app.listen(port, () => { - console.log(`Listening at http://localhost:${port}`); + console.log(`Listening at http://localhost:${port}/${globalPrefix}`); }); }