Skip to content

Commit

Permalink
refactor(nx): modifies log for NestJS apps to reflect global prefix (#…
Browse files Browse the repository at this point in the history
…1201)

Clears confusion from console.log on NestJS apps when bootstrapped

re #1132
  • Loading branch information
hotpixelgroup authored and FrozenPandaz committed Apr 1, 2019
1 parent 753c8e0 commit 256d83c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
});
}

Expand Down

0 comments on commit 256d83c

Please sign in to comment.