#How can i check if I'm on production or on development?

3 messages · Page 1 of 1 (latest)

stiff idol
#

I think you need to define variables in convex variables and you cannot use ones from .env file. But how can i define them in convex so that I get development when i run this on localhost and production when it's a deployed version?

karmic wigeonBOT
#

Thanks for posting in #1088161997662724167.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.

  • Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
  • Use search.convex.dev to search Docs, Stack, and Discord all at once.
  • Additionally, you can post your questions in the Convex Community's #1228095053885476985 channel to receive a response from AI.
  • Avoid tagging staff unless specifically instructed.

Thank you!

mild gust
#

Welcome! In the dashboard you have separate development and production deployments for each project. Each deployment has it's own environment variables list under settings.