Detecting dev vs prod
Is there a way I can detect if I'm in the dev or prod environment in my code?
2 Replies
Not currently! You can build this yourself by adding an environment variable like IS_PROD and setting it on the dashboard.
Seems like it would be convenient to have a system environment variable for this so you don’t need to set it manually
You also have access to the CONVEX_CLOUD_URL env variable which you could compare against your prod url - which can be imported from convex.json