Configuration/Environment Variables

Detailing configuration and environmental/global variables for QMd.

QMd Global Variables/Settings

Global variables for the QMd application, found in config/Settings.js Variables are set to the following default values.

`const settings = { DEFAULT_RANGE: 11, RANGE_OFFERED: [7, 9, 11], PROGRESS_FLAGS: [0, 1, 2, 3], CHAR_LIMIT: 350, NAME_LIMIT: 100, STATE_LIMIT: 80, FIELDS_LIMIT: 10, FIELD_NAME_LIMIT: 100, PAGINATE_TABLES: 10, PAGINATE_LISTS: 5, EXPIRE_TIME: 7200 }

RANGE_OFFERED The number of columns in the survey grid. 7 corresponds to a range of -3 to +3, 9 to a range of +4 to -4, and so on. (Use only odd numbers).

DEFAULT RANGE The default range (from the list of possible ranges)

PROGRESS_FLAGS Progress indicators to indicate user progress. By default, 0 when user is first created, 1 when the registration data is filled, 2 when the initial sort page is completed and 3 when the questionnaire data is submitted (and thus the survey is complete).

CHAR_LIMIT The character limit for statements. Default is 350 characters.

NAME_LIMIT The character limit for survey names. Default is 100 characters.

STATE_LIMIT The maximum number of statements per survey. Default is 80 statements.

FIELDS_LIMIT The maximum number of fields per questionnaire/registration. Default is 10 fields.

FIELD_NAME_LIMIT The character limit for survey field questions. Default is 100 characters.

PAGINATE_TABLES The maximum number of survey items to display per table. Default is 10.

PAGINATE_LISTS The maximum number of registration/questionnaire fields to display per list. Default is 5.

EXPIRE_TIME The amount of time that a login token is valid before expiring (in seconds). Default is 7200 seconds.

QMd Environment Variables

Environment Variables are passed in during runtime to the express server. These variables are required and mandatory and must be set to ensure correct operation when deploying a production build.

ADMIN_LOGIN_NAME The username for the administrator

ADMIN_LOGIN_PASSWORD The password for the administrator

MONGODB_URI Link to MongoDB driver, used to communicate with remote or local mongo database to store the respondant data and survey parameters.

PUBLIC_KEY An encrypted RSA (2048 bit assumed) public key for decrypting JsonWebTokens for authentication

PRIVATE_KEY An encrypted RSA (2048 bit assumed) private key for encrypting JsonWebTokens for authentication

Last updated