-
Notifications
You must be signed in to change notification settings - Fork 479
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.ts and 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:
./admin/website-angular/src/environments/environment.tsand./admin/website-angular/src/environments/environment.prod.ts. - in Mobile Shop:
./shop/mobile-ionic/src/environments/environment.tsand./shop/mobile-ionic/src/environments/environment.prod.ts - in Web Shop:
./shop/website-angular/src/environments/environment.tsand./shop/website-angular/src/environments/environment.prod.ts - in Carrier App:
./carrier/mobile-ionic/src/environments/environment.tsand./carrier/mobile-ionic/src/environments/environment.prod.ts - in Merchant App:
./merchant/tablet-ionic/src/environments/environment.tsand./merchant/tablet-ionic/src/environments/environment.prod.ts
Note: you should never edit auto-generated files above and instead you should edit relevant .env files for custom configurations, see more details below.
-
REST API over HTTP - Port
5500(normally will be mapped to 443 with SSL termination) -
REST API over HTTPS - Port
2087(disabled by default because termination with SSL not recommended in NodeJS processes) -
GraphQL API over HTTP - Port
8443 -
GraphQL WebSocket Subscriptions over HTTP - Port
2086
-
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.envfile. -
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/.env.templateto./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.envfile. -
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.envfile. -
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.envfile.
Notes:
-
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.envfiles. -
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) inenvironment.tsandenvironment.prod.tsfiles because all of them will be loaded into the browser and made public. Because we are using auto-generatedenvironment.tsandenvironment.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.