okta / samples-js-angular

samples-js-angular
https://github.com/okta/samples-js-angular
Other
73 stars 149 forks source link

Environment vars / samples config #36

Closed aarongranick-okta closed 5 years ago

aarongranick-okta commented 5 years ago

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

RELATED 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 run updateConfig() in setup-env.js

aarongranick-okta commented 5 years ago

Note that passing environment vars to the resource-server in the startResourceServer.js has no effect until related PR is merged, published: https://github.com/okta/samples-nodejs-express-4/pull/69