INNER CODE UNIT · TypeScript

Application

rodyherrera/Quantum · packages/api/src/core/Application.ts:20

export default class Application{
    #app!: FastifyInstance;
    #dataSource?: DataSource;

    get dataSource(): DataSource | undefined{
        return this.#dataSource;
    }

    async build(): Promise<FastifyInstance>{
        logger.configure({ level: config.log.level as LogLevel, pretty: config.log.pretty });
        this.#app = Fastify({
            loggerInstance: logger.raw as FastifyBaseLogger,
            disableRequestLogging: true
        });

        this.#registerRawBodyCapture();

        await this.#app.register(cors, {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…