From e26744141b66ff79415677f835bf8071e81ad967 Mon Sep 17 00:00:00 2001 From: nin0dev Date: Sat, 26 Oct 2024 18:48:45 -0400 Subject: [PATCH] refactor: do not match example routes --- src/index.ts | 2 +- src/rest/{example.ts => _example.ts} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename src/rest/{example.ts => _example.ts} (100%) diff --git a/src/index.ts b/src/index.ts index d9caf79..2d177f4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,7 +12,7 @@ export const server = fastify({ server.register(bootstrap, { directory: resolve(__dirname, "rest"), - mask: RegExp(/\.(js|ts)$/), + mask: /^(?!_example\.ts$).*\.(js|ts)$/, prefix: "/api" }); diff --git a/src/rest/example.ts b/src/rest/_example.ts similarity index 100% rename from src/rest/example.ts rename to src/rest/_example.ts