Search code examples
monoreponrwl-nxnomachine-nxnestjs-config

NestJS Configuration in a Nrw Nx Monorepo?


I've just started using Nx and I'm moving my existing project over to a Monorepo environment.

The problem I have is with the NestJs app. For some reason the configuration file never gets read. I've tried moving it to different locations but I can't find where to put the config file. It doesn't ever seem to get read?

Are configs supported? Do you have any ideas of where I should put the file?


Solution

  • Looks like you need to use the env files directly now.

    import { environment } from './environments/environment';
    ...
    environment.settingName