cody
cody
CCConvex Community
Created by Eva on 9/5/2024 in #support-community
Setting up a custom domain
Thanks for sharing this So, are you setting the convex url to the cloudflare preview deployment secrets via api in the github action?
28 replies
CCConvex Community
Created by Eva on 9/5/2024 in #support-community
Setting up a custom domain
Hi @Eva – I'm trying to get convex preview deployments set up with cloudflare pages right now and it's not working out so far. Were you able to get it working? @sshader As far as I know, env variables set using vite are not available in cloudflare pages deployments. Variables can be set in the wrangler.toml or the cloudflare dashboard, then they're available on the server. I'm using remix, so I access them in loaders/actions:
export async function loader(args: LoaderFunctionArgs) {
const env = args.context.cloudflare.env

return env
}
export async function loader(args: LoaderFunctionArgs) {
const env = args.context.cloudflare.env

return env
}
In the cloudflare build logs it looks like everything working correctly, a convex preview deployment is created, cloudflare deployment is created, but the app isn't functional because it doesn't have access to the preview CONVEX_URL
28 replies
DTDrizzle Team
Created by Jumaron on 8/9/2023 in #help
Planetscale Serverless for Relational queries
I was confused by that as well. I think the intention was to show how to set it up if you're using mysql2 with the planetscale driver - not to imply that you have to use mysql2 to get relational queries to work with the planetscale driver
40 replies