I am trying to figure out how I can us my ConfigService created as described here. Within the top-most level of my application.
My main.js file looks like this:
import { NestFactory } from '@nestjs/core';
import { TypeormStore } from 'connect-typeorm';
import * as session from 'express-session';
import { getRepository } from 'typeorm';
import { Session } from '../../domains/session/Session';
import { AppModule } from './AppModule';
async function bootstrap() {
    const app = await NestFactory.create(AppModule);
    app.use(session({
        resave: false,
        saveUninitialized: false,
        store: new TypeormStore({
            cleanupLimit: 2,
            ttl: 86400
        }).connect(getRepository(Session)),
        secret: process.env.COOKIE_SECRET as string
    }))
    await app.listen(3000);
}
bootstrap();
What I'd like is to move process.env.COOKIE_SECRET to a getter inside ConfigService. Can I access services at this level?