Track the current version of the app running in the container.
Determine the current academic year based on server time
If the date is between Jan 1st and Jun 30th (inclusive), then the academic year is the current calendar year. If the date is between Jul 1st and Dec 31st (inclusive), then the academic year is the next calendar year.
Determine what kind of authentication should be used
Return the base URL for HarvardKey's cas authentication process Should strip out any auth credentials, query strings and hashes, and remove any trailing slash
Return the /validate endpoint for the application, which will be sent to HarvardKey as the service URL. Should strip out any auth credentials, query strings and hashes, and remove any trailing slash
Return a WHATWG URL object for the CAS URL, thowing an error if CAS_URL is not specified
As URL objects are mutable, we should avoid exposing and/or modifying this value directly
Return the base URL for the client application. Used as default return redirect in the auth process. Should strip out any auth credentials, query strings and hashes, and remove any trailing slash
Return a WHATWG URL object for the CLIENT URL, thowing an error if CLIENT_URL is not specified
As URL objects are mutable, we should avoid exposing and/or modifying this value directly
Return connection parameters for the TypeORM module
The entities property uses a file glob to final all declared entities. Because we're transpiling our code and copying into docker for production, we need to slightly modify the path and extension for our entities.
check if the app is currently running in development mode
check if the app is currently running in production
Ensures that the log level in the environment variable is a valid value.
If it's not, or if it's undefined, then return error
as our default.
Return the redis client options NOTE: This is needed to properly connect to redis over TLS
Return a WHATWG URL object for the SERVER URL, thowing an error if SERVER_URL is not specified
As URL objects are mutable, we should avoid exposing and/or modifying this value directly
Return a single value from the environment
Return the configuration for the session module
Attempt to read the current build version from the .dockerversion file, or else return an empty string.
Generated using TypeDoc
Parses process.env to create a clean configuration interface