From 755e2616a487c234b310870841902f5716f9103c Mon Sep 17 00:00:00 2001 From: Abhishek Chatterjee Date: Mon, 18 May 2026 00:28:22 +0530 Subject: [PATCH] feat(config): ROSS-165: inject appConfig into fastify request context --- src/server.ts | 2 ++ src/types/fastify.d.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/src/server.ts b/src/server.ts index 0ff0114..19ee6ab 100644 --- a/src/server.ts +++ b/src/server.ts @@ -99,6 +99,8 @@ export async function startServer( }, }); + app.appConfig = config; + // Track each registered route app.addHook('onRoute', routeOptions => { routes.push({ diff --git a/src/types/fastify.d.ts b/src/types/fastify.d.ts index ba7b8a5..e8a25eb 100644 --- a/src/types/fastify.d.ts +++ b/src/types/fastify.d.ts @@ -29,5 +29,6 @@ declare module 'fastify' { ) => StructuredResponse; redis?: Redis; jwt: import('@fastify/jwt').JWT; + appConfig: AppConfig; } }