refactor(nx): modifies log for NestJS apps to reflect global prefix (#1201)

Clears confusion from console.log on NestJS apps when bootstrapped

re #1132
This commit is contained in:
Hot Pixel Group 2019-04-01 13:23:33 -05:00 committed by Jason Jean
parent 753c8e0e2a
commit 256d83c3f9

View File

@ -9,10 +9,11 @@ import { AppModule } from './app/app.module';
async function bootstrap() { async function bootstrap() {
const app = await NestFactory.create(AppModule); const app = await NestFactory.create(AppModule);
app.setGlobalPrefix(`api`); const globalPrefix = 'api';
app.setGlobalPrefix(globalPrefix);
const port = process.env.port || 3333; const port = process.env.port || 3333;
await app.listen(port, () => { await app.listen(port, () => {
console.log(`Listening at http://localhost:${port}`); console.log(`Listening at http://localhost:${port}/${globalPrefix}`);
}); });
} }