Solves many issues caused by config variables stored in multiple places. On a clean install these vars can (are) set by running the tests with environment vars. This allows our CI environment to install and test using only environment variables. However, on the next run the values stored in the config will be used instead of environment variables. This is frustrating and confusing to the local developer. It is unclear how to recreate the experience of running the samples using environment variables. The problems are multiplied if the developer attempts to run tests. This PR consolidates these variables to so they are either defined in the shell as env vars or persisted in a single file: testenv
removes postinstall step and default-config.ts files
no more editing of .samples.config.ts (file is unused now)
requires ISSUER and CLIENT_ID values to be set as environment variables
throws if required environment vars are not set
uses support for a testenv file to persist environment values
single testenv file is shared for all samples in this repo, also used (optionally) for manual test runs
uses webpack to expose environment vars to Angular
Solves many issues caused by config variables stored in multiple places. On a clean install these vars can (are) set by running the tests with environment vars. This allows our CI environment to install and test using only environment variables. However, on the next run the values stored in the config will be used instead of environment variables. This is frustrating and confusing to the local developer. It is unclear how to recreate the experience of running the samples using environment variables. The problems are multiplied if the developer attempts to run tests. This PR consolidates these variables to so they are either defined in the shell as env vars or persisted in a single file:
testenv
postinstall
step anddefault-config.ts
files.samples.config.ts
(file is unused now)testenv
file to persist environment valuestestenv
file is shared for all samples in this repo, also used (optionally) for manual test runsRELATED PR: https://github.com/okta/samples-nodejs-express-4/pull/69
When the
resource-server
will accept environment variables we will no longer need to runupdateConfig()
insetup-env.js