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}`); }); }