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; } }