vercel icon indicating copy to clipboard operation
vercel copied to clipboard

vc dev failed to proxy requests to /pages/api/* when there are other serverless functions at /api/*

Open williamli opened this issue 2 years ago • 2 comments

Vercel CLI version: 23.1.2

Reproduction: Using the Next.js template (with a hello API at /pages/api/hello), add a python API at /api/date.py) and try to access https://localhost:3000/api/hello using vc dev.

Repo: https://github.com/vercel-support/62263-nextjs-with-python-api Vercel Project: https://vercel.com/vercel-support/62263-nextjs-with-python-api

williamli avatar Dec 09 '21 15:12 williamli

I have had the same issue with Go functions. Is there any way to run serverless functions alongside next.js API routes?

britt avatar Apr 24 '22 19:04 britt

@britt https://github.com/vercel/vercel/discussions/4023#discussioncomment-3657

leerob avatar Jun 20 '22 21:06 leerob

There's a good comment there ☝🏾 I also gave an example of how to use Flask here: https://github.com/andymckay/test-vercel-flask. Hope that helps, thank you for asking 🙇🏾

andymckay avatar Nov 29 '22 22:11 andymckay