This is something I've been wondering, but haven't really been able to figure out yet. If I'm building a product that relies pretty heavily on the API, in terms of speed, scalability, etc. is there any difference between building a NextJS site with the /api route publicly exposed vs. an API build using Node/Express standalone?
Yes, there are slight performance differences when building an API with NextJS, "vanilla Node" or using Express/Fastify etc but if you are building an MVP I think speed and scalability isn't your main concern right know.
Of course, at the end, the quickest implementation is the "winner" but in real life you'll usually solve your scalability problems scaling horizontally and vertically.
Remember there are plenty of software out there written PHP and is working fine 😈
Deployment hosts like Netlify and Vercel run these within lambdas. Lambdas can have existing Node.js runtimes already running, in which case it's equivalent to the API being directly exposed. If there's not already a runtime running, then you need to pay the container startup cost.