https://supertokens.com/ logo
#general
Title
# general
p

porcx

03/22/2022, 11:05 AM
Thanks @User for the quick response.
configService
in nest js helps to get the env vars when injected. Somethig like this in app.module.ts
Copy code
TypeOrmModule.forRootAsync({
      useFactory:async (config: ConfigService) => ({
        type: 'postgres',
        host: config.get('POSTGRES_HOST'),
        port: config.get('POSTGRES_PORT'),
        username: config.get('POSTGRES_USER'),
        password: config.get('POSTGRES_PASSWORD'),
        database: config.get('POSTGRES_DATABASE'),
      }),
      inject: [ConfigService]
    })
I want to do something similar to AuthModule as well