Deploying the backend
Getting set up with Convex
If you run into any trouble, refer to the official documentation from Convex.
Setup
-
Login or sign up for a Convex account
-
Create a new project
-
Install the Convex CLI
pnpm add -g convex -
Login to your Convex account
pnpx convex login -
Initialize your development environment
pnpx convex devNote: Make sure to choose the project you created in step 2
Note: This should fail due to missing environment variables. Once it fails, hit
Ctrl + Cto stop the server. -
Commit and push your changes
-
Set production environment variables
Navigate to the project settings for your convex production deployment. You will need to generate a deployment key. Once you have this, set the following environment variables in the Vercel dashboard.
NEXT_PUBLIC_CONVEX_URL=<your-convex-deployment-url> CONVEX_DEPLOYMENT=<your-deployment-key>