diff --git a/routes.ts b/routes.ts index ca3b5fcb..3fabb7ac 100644 --- a/routes.ts +++ b/routes.ts @@ -99,10 +99,8 @@ export const routeMatcher = new Bun.FileSystemRouter({ dir: `${process.cwd()}/server/api`, }); -export const matchRoute = async (url: string) => { +export const matchRoute = (url: string) => { const route = routeMatcher.match(url); - console.log(route); - return route ?? null; }; diff --git a/server.ts b/server.ts index 6874c73f..ee0ba983 100644 --- a/server.ts +++ b/server.ts @@ -116,10 +116,12 @@ export const createServer = ( } // If route is .well-known, remove dot because the filesystem router can't handle dots for some reason - const matchedRoute = await matchRoute( + const matchedRoute = matchRoute( req.url.replace(".well-known", "well-known"), ); + console.log(matchedRoute); + if ( matchedRoute && Object.keys(matchedRoute).length !== 0 &&