title: How to use environment variables in ClientsModule?
body: <p>I'm trying to use environment variables in the ClientsModule as such:</p>
  
  <pre class="lang-js prettyprint-override"><code>import { Module } from '@nestjs/common';
  import { ClientsModule, Transport } from '@nestjs/microservices';
  
  @Module({
    imports: [
      TypeOrmModule.forFeature([Process]),
      ClientsModule.register([
        {
          name: 'PROCESS_SERVICE',
          transport: Transport.RMQ,
          options: {
            queue: process.env.RMQ_PRODUCER_QUEUE_NAME,
            urls: [process.env.RMQ_PRODUCER_URL],
            queueOptions: { durable: true },
          },
        },
      ]),
  </code></pre>
  <p>And I've also tried this:</p>
  <pre class="lang-js prettyprint-override"><code>
  import { Module } from '@nestjs/common';
  import { ClientsModule, Transport } from '@nestjs/microservices';
  import { ConfigService } from '@nestjs/config';
  
  const configService = new ConfigService();
  const rmqProcessUrl = configService.get&lt;string&gt;('RMQ_PRODUCER_URL');
  const rmqProcessQueue = configService.get&lt;string&gt;('RMQ_PRODUCER_QUEUE');
  
  @Module({
    imports: [
      TypeOrmModule.forFeature([Process]),
      ClientsModule.register([
        {
          name: 'PROCESSES_SERVICE',
          transport: Transport.RMQ,
          options: {
            queue: rmqProcessQueue,
            urls: [rmqProcessUrl],
            queueOptions: { durable: true },
          },
        },
      ]),
  </code></pre>
  <p>But in both occasions the following error appears:</p>
  <blockquote>
  <p>TypeError: metatype is not a constructor</p>
  </blockquote>
  <p>It works as intended when I use the values directly. I have also tried importing and using</p>
  <pre class="lang-js prettyprint-override"><code>export const rmqServiceName = process.env.RMQ_PRODUCER_QUEUE_NAME
  </code></pre>
  <p>and</p>
  <pre class="lang-js prettyprint-override"><code>export const rmqServiceName = process.env.RMQ_PRODUCER_URL
  </code></pre>
  <p>but that also results in the same error.</p>
  <p>So how can I get access to the <code>.env</code> variables in the <code>@ClientsModule</code>?
  Is there a workaround that I'm missing?</p>