diff --git a/packages/schematics/src/collection/node-application/files/express/main.ts__tmpl__ b/packages/schematics/src/collection/node-application/files/express/main.ts__tmpl__ index 2e20d45ec2..c7ab20b76e 100644 --- a/packages/schematics/src/collection/node-application/files/express/main.ts__tmpl__ +++ b/packages/schematics/src/collection/node-application/files/express/main.ts__tmpl__ @@ -7,7 +7,7 @@ import * as express from 'express'; const app = express(); -app.get('/', (req, res) => { +app.get('/api', (req, res) => { res.send(`Welcome to <%= name %>!`); }); 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 fd312c6452..aa2971eb81 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,6 +9,7 @@ import { AppModule } from './app/app.module'; async function bootstrap() { const app = await NestFactory.create(AppModule); + app.setGlobalPrefix(`api`); const port = process.env.port || 3333; await app.listen(port, () => { console.log(`Listening at http://localhost:${port}`);