-
Notifications
You must be signed in to change notification settings - Fork 553
Gauzy Platform Configuration
We created templates & initial configuration files (with reasonable defaults) for each project in the Platform, to save your time and keep things simple.
In the Angular based projects, the "standard" environment configuration files environment.ts and environment.prod.ts will be auto-generated from .env file (if it exists) or from default settings on the first app run. See https://github.com/ever-co/gauzy/blob/develop/.scripts/configure.ts script.
Note: you should never edit auto-generated files above and instead you should edit relevant .env files for custom configurations, see more details below.
Notes:
- For initial development no changes required in the .env files in the projects, unless some manual changes were done to the Backend (API) configuration. However, to enable some of the Platform features, you may need to change relevant configurations in corresponding .env files.
As a general rule, files .env are configurations you should never make public (and of course never commit to Git repo), unless you removed all private/secure parameters from them. In addition, for Angular based projects, you should never put any secure settings (e.g. Secret Keys, API Keys, etc) in environment.ts and environment.prod.ts files because all of them will be loaded into the browser and made public. Because we are using auto-generated environment.ts and environment.prod.ts files, it means you should never put any security-related settings into .env
files in our Angular projects. The only safe place to put secure settings is the .env
file on the backend API/Server project!
We are using dotenv
(.env
) in Angular based projects for consistency with configuration between all our Platform projects only.