Omar Farooq
Omar Farooq•17mo ago

How can I change my local env to point to prod?

Need to load some data from prod
6 Replies
ballingt
ballingt•17mo ago
Some CLI commands like npx convex run and npx convex import take a --prod flag, it sounds like that's what you want here? Or do you want to set your local dev to be live updating prod?
Omar Farooq
Omar FarooqOP•17mo ago
yes I'd like for my localhost:3000 browser to load the prod env
ballingt
ballingt•17mo ago
Ah got it! Then you want to change the environment variable used to construct you Convex client Typically this is NEXT_PUBLIC_CONVEX_URL or VITE_CONVEX_URL or similar
Omar Farooq
Omar FarooqOP•17mo ago
yes, of course, okay got it thank you 🙂 hmmm my local .env is pointed to prod I have a page that renders the CSS based on the db for some reason its not loading on dev
ballingt
ballingt•17mo ago
usually the .env.local file is used in dev and .env is just used in prod.
Omar Farooq
Omar FarooqOP•17mo ago
hmm I don't have one of these nvm found it

Did you find this page helpful?