Deployment URL
Hi, I am kind of confused about the "Deployment URL" shown in my dashboard or command line output, what's it used for? Is it used for hosting platform like Vercel ?
3 Replies
The deployment URL is where you push your Convex functions and where the Convex client connects to with a WebSocket.
It's useful for a hosting platform like Vercel, since your website needs to know where to connect to find your Convex deployment — but you also need it without a hosting platform. https://docs.convex.dev/api/modules/react#creating-the-client
Module: react | Convex Developer Hub
Tools to integrate Convex into React applications.
Normally this URL is saved in a .env file (for prod) or .env.local file (for development), and then your code references that environment variable to know where to connect.
Got it, thanks.