How would I go about using Nest's ConfigService in the configure method of the AppModule? I need to set up the session options (e.g. secret, sameSite, maxAge) depending on the environment, so hard-coding is a no-go. Should I use some other configuration method instead?
How would I go about using Nest's
ConfigServicein theconfiguremethod of theAppModule? I need to set up the session options (e.g.secret,sameSite,maxAge) depending on the environment, so hard-coding is a no-go. Should I use some other configuration method instead?You can inject the
ConfigServicejust like we doRedisand usethis.config.get('SESSION-SECRET')or whatever else you would need to