1

How can we use Vercel Middlware (https://vercel.com/docs/functions/edge-middleware/middleware-api) in a backend API developed using Hono for Vercel (https://hono.dev/docs/getting-started/vercel) ? I want to use the Vercel's middleware and then have different functions for different routes much like folder based routing that we have in Nextjs. Using Nextjs for API is too much overkill as the app becomes too big and take a lot of time to build apart from having negative impact on performance.

I tried putting middleware.js on the root of the project as suggested by Vercel but the request does not hit there at all.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.