Module: config

Module to set up and export configuration options for the application based on environment variables. If NODE_ENV is not production, environment variables are loaded from a .env file. Environment Variables: - **NODE_ENV**: The node environment (production/development) - **PORT**: Port number to run the server (default: 8080) - **HOST**: Host name or IP address to bind the server (default: "0.0.0.0") - **HOST_URL**: Full URL of the server; if not provided, it is constructed using HOST and PORT - **COOKIE_ENCRYPT_PWD**: Password to encrypt cookies - **SQL_SERVER**: SQL server name/address - **SQL_DATABASE**: Name of the SQL database - **SQL_USER**: Username for SQL database authentication - **SQL_PASSWORD**: Password for SQL database authentication - **SQL_ENCRYPT**: Determines if SQL connection encryption is enabled (should be 'true' to enable) - **OKTA_ORG_URL**: URL of the Okta organization for authentication - **OKTA_CLIENT_ID**: Client ID for Okta integration - **OKTA_CLIENT_SECRET**: Client secret for Okta integration
Source:

module:config :Config

The configuration object for the application.
Source:

Type Definitions

Config

Type:
  • Object
Properties:
Name Type Description
port number | string The port number on which the server runs.
HOST string The host address for the server.
url string The full URL of the server.
cookiePwd string The password used for encrypting cookies.
sql SqlConfig SQL configuration settings.
okta OktaConfig Okta configuration settings for authentication.
Source:

OktaConfig

Type:
  • Object
Properties:
Name Type Description
url string The Okta organization URL.
clientId string The Okta client ID.
clientSecret string The Okta client secret.
Source:

SqlConfig

Type:
  • Object
Properties:
Name Type Description
server string The SQL server address.
database string The SQL database name.
user string The SQL user name.
password string The SQL user password.
options SqlOptions Additional options for the SQL connection.
Source:

SqlOptions

Type:
  • Object
Properties:
Name Type Description
encrypt boolean Flag indicating if SQL encryption is enabled.
enableArithAbort boolean Enables arithmetic abort option.
Source: