feat: implement type-safe environment configuration and add .env.example files for web and landing apps
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Type-safe Environment Wrapper for apps/web.
|
||||
* DO NOT use `import.meta.env` directly in components. Import this `ENV` object instead.
|
||||
*/
|
||||
export const ENV = {
|
||||
API_BASE_URL: import.meta.env.VITE_API_BASE_URL || 'http://localhost:8000/api',
|
||||
APP_ENV: (import.meta.env.VITE_APP_ENV || 'development') as 'development' | 'staging' | 'production',
|
||||
IS_PROD: import.meta.env.VITE_APP_ENV === 'production',
|
||||
} as const;
|
||||
|
||||
Reference in New Issue
Block a user