Skip to content

Managing Environment Variables

Overview

Our projects use different .env files to manage environment-specific configurations:

  • .env.development: This file contains configurations used during development. For example, API endpoints are configured to route through local development proxies.

  • .env.production: Used in production, this file contains the actual API endpoints and other environment-specific settings. Production means any upload even uploading to dev endpoints.

Special Configurations

Due to our authentication protocols, local development requires a proxy to access services. The .env.development files therefore use proxy paths like /devapi and /prodapi, which are redirected by the Vite server to the appropriate endpoints. In contrast, .env.production must include the direct API endpoints since there is no server-side redirection in production environments (No SSR for now 🥲).

Also please don't commit changes in .env.development to the repository, it's a local file and should stay that way.