edge
Unanswered
Nile tilapia posted this in #help-forum
Original message was deleted.
2 Replies
New Guinea Freshwater Crocodile
I'm afraid you cannot, because Vercel Functions configurations are through exports in the file, so all the routes on the same file should use the same config.
And on the Next documentation, you can see this:
Source: https://nextjs.org/docs/app/building-your-application/routing/route-handlers#route-resolution
i.e. you can't define the same route with different verbs into differents files
And on the Next documentation, you can see this:
Each route.js or page.js file takes over all HTTP verbs for that route.. Source: https://nextjs.org/docs/app/building-your-application/routing/route-handlers#route-resolution
i.e. you can't define the same route with different verbs into differents files
There's probably a way to do that with middlewares, but I wouldn't recommend that