Hey Octal👋🏼
There are a couple of benefits of using Next.js API routes rather than a traditional server.
• Developer experience: it’s easier to have one project with frontend and backend
• When deploying to Vercel, API routes become serverless functions. This means is you don’t have to worry about Scalability or provisioning your own server
• With serverless computing you only pay for what you use, which is cheaper (I’m not 100% sure of the cost difference so I’ll need to dig into it)
Of course Serverless also has tradeoffs. For example you can’t do realtime (eg. GraphQL subscriptions) because it needs a stateful connection