[📖] Detail usage with Vercel endpoints
Suggestion
I am hosting my Qwik app on Vercel. My backend is written in tRPC (https://trpc.io/).
I'd like the actual backend to be hosted on Vercel Endpoints or something similar like Vercel Functions. However, when I put my endpoint in /pages/api as stated in the documentation, the endpoints don't work locally.
I have to run next dev instead of vite dev --mode=ssr. However, when I do that, the actual components are not available, and only the APIs.
i am so confused, are you mixing next and qwik?
Yes, why not?
It says Qwik can be hosted on Vercel. I thought that also meant that Vercel edge functions and endpoints could be used.
I'm building a super small app, and I thought it would be great if I didn't have to host my backend in AWS or something that requires more setup. Then instead of setting up a database and a Lambda or whatever, I'd be able to just use Vercel KV store and their server side endpoints.
See this: https://vercel.com/docs/concepts/functions/serverless-functions
Technically, the above is not a next.js feature. It's a Vercel feature. You can run it using a Node app as well.
And since it was mentioned somewhere that Qwik could be hosted on Vercel, I was expecting that part to work too.
Hi @ffMathy you can definitely use Vercel edge with Qwik but you need to use Qwik as your backend and frontend. We have the Vercel adapter for that: https://qwik.dev/docs/deployments/vercel-edge/.
I'm closing this issue for now as this is not the intended way to use/deploy Qwik atm.