Ever 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.prod.ts will be auto-generated from .env file (if it exists) or from default settings on the first app run.
So, the following files will be auto-generated:
- in Admin UI:
- in Mobile Shop:
- in Web Shop:
- in Carrier App:
- in Merchant App:
Note: you should never edit auto-generated files above and instead you should edit relevant .env files for custom configurations, see more details below.
Custom / Manual
For Backend (API) configuration, the
./backend/api/.env.templatefile should be copied into
./backend/api/.envand relevant changes should be done in the
.envfile. It means you should have
./backend/api/.envfile in place to be able to run the Platform on developer machine if you want to use different settings to our defaults.
For Admin Angular App configuration, the
./admin/website-angular/.env.templatefile should be copied into
./admin/website-angular/.envand relevant changes should be done in the
For Merchant Ionic App configuration, the
./merchant/tablet-ionic/.env.templatefile should be copied into
./merchant/tablet-ionic/.envand relevant changes should be done in the
.envfile. If you need to run Merchant App using PM2 (as Web app, not Tablet App), needs copy
./merchant/tablet-ionic/.envand make relevant changes (if required)
For Shopping Mobile App (Ionic) configuration, the
./shop/mobile-ionic/.env.templatefile should be copied into
./shop/mobile-ionic/.envand relevant changes should be done in the
For Shopping Website configuration, the
./shop/website-angular/.env.templatefile should be copied into
./shop/website-angular/.envand relevant changes should be done in the
For Carrier Mobile App (Ionic) configuration, the
./carrier/mobile-ionic/.env.templatefile should be copied into
./carrier/mobile-ionic/.envand relevant changes should be done in the
For initial development no changes required in the
.envfiles 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
As a general rule, files
.envare 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.prod.tsfiles because all of them will be loaded into the browser and made public. Because we are using auto-generated
environment.prod.tsfiles, it means you should never put any secure settings into
.envfiles in our Angular projects. The only safe place to put your secure settings is
.envfile 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.