-
Notifications
You must be signed in to change notification settings - Fork 465
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.ts
and./admin/website-angular/src/environments/environment.prod.ts
. - in Mobile Shop:
./shop/mobile-ionic/src/environments/environment.ts
and./shop/mobile-ionic/src/environments/environment.prod.ts
- in Web Shop:
./shop/website-angular/src/environments/environment.ts
and./shop/website-angular/src/environments/environment.prod.ts
- in Carrier App:
./carrier/mobile-ionic/src/environments/environment.ts
and./carrier/mobile-ionic/src/environments/environment.prod.ts
- in Merchant App:
./merchant/tablet-ionic/src/environments/environment.ts
and./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.template
file should be copied into./backend/api/.env
and relevant changes should be done in the.env
file. It means you should have./backend/api/.env
file 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.template
file should be copied into./admin/website-angular/.env
and relevant changes should be done in the.env
file. -
For Merchant Ionic App configuration, the
./merchant/tablet-ionic/.env.template
file should be copied into./merchant/tablet-ionic/.env
and relevant changes should be done in the.env
file. If you need to run Merchant App using PM2 (as Web app, not Tablet App), needs copy./merchant/tablet-ionic/.env.template
to./merchant/tablet-ionic/.env
and make relevant changes (if required) -
For Shopping Mobile App (Ionic) configuration, the
./shop/mobile-ionic/.env.template
file should be copied into./shop/mobile-ionic/.env
and relevant changes should be done in the.env
file. -
For Shopping Website configuration, the
./shop/website-angular/.env.template
file should be copied into./shop/website-angular/.env
and relevant changes should be done in the.env
file. -
For Carrier Mobile App (Ionic) configuration, the
./carrier/mobile-ionic/.env.template
file should be copied into./carrier/mobile-ionic/.env
and relevant changes should be done in the.env
file.
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) inenvironment.ts
andenvironment.prod.ts
files because all of them will be loaded into the browser and made public. Because we are using auto-generatedenvironment.ts
andenvironment.prod.ts
files, it means you should never put any secure settings into.env
files in our Angular projects. The only safe place to put your secure settings is.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.