title: Right way to get ConfigService when bootstrap microservice
body: <p>I would like to know if i'm getting ConfigService the right way during bootstrap my microservice.</p>
  
  <p>Is there a way to do it using NestFactory.createMicroservice()?</p>
  
  <pre><code>async function bootstrap() {
    const app = await NestFactory.create(CoreModule, {
      logger: new MyLogger(),
    });
    const configService: ConfigService = app.get(ConfigService);
    app.connectMicroservice({
      transport: Transport.TCP,
      options: {
        port: configService.PORT,
      },
    });
    await app.startAllMicroservicesAsync();
  }
  </code></pre>