for developers - usil/eventhos-api GitHub Wiki

You could export all the values direct to the shell before the start

export NODE_ENV=production
export CPU_COUNT=1
export PORT=2109      
export DATA_BASE_NAME=eventhos
export DATA_BASE_HOST=your-ip-or-localhost
export DATA_BASE_PORT=3306
export DATA_BASE_USER=usr_eventhos
export DATA_BASE_PASSWORD=changeme
export DATA_BASE_POOL_MAX=300
export DATA_BASE_POOL_MIN=100
export DATA_BASE_ACQUIRE_CONNECTION_TIMEOUT=10000
export JWT_SECRET=changeme
export CRYPTO_KEY=changeme
export SMTP_HOST=changeme
export SMTP_PORT=587
export SMTP_USER=changeme
export SMTP_PASSWORD=changeme
export SMTP_SECURE=true
export SMTP_TLS_CIPHERS=SSLv3
export SMTP_DEFAULT_RECIPIENT=changeme
export TZ=America/Lima
export HTTP_BODY_SIZE_LIMIT=50mb
export SMTP_SUBJECT_MODE=dev

Or create an .env file with the following content:

NODE_ENV=production
CPU_COUNT=1
PORT=2109      
DATA_BASE_NAME=eventhos
DATA_BASE_HOST=your-ip-or-localhost
DATA_BASE_PORT=3306
DATA_BASE_USER=usr_eventhos
DATA_BASE_PASSWORD=changeme
DATA_BASE_POOL_MAX=300
DATA_BASE_POOL_MIN=100
DATA_BASE_ACQUIRE_CONNECTION_TIMEOUT=10000
JWT_SECRET=changeme
CRYPTO_KEY=changeme
SMTP_HOST=changeme
SMTP_PORT=587
SMTP_USER=changeme
SMTP_PASSWORD=changeme
SMTP_SECURE=true
SMTP_TLS_CIPHERS=SSLv3
SMTP_DEFAULT_RECIPIENT=changeme
TZ=America/Lima
HTTP_BODY_SIZE_LIMIT=50mb
SMTP_SUBJECT_MODE=dev

For queue, add these

USE_QUEUE = true
QUEUE_HOST = localhost
QUEUE_HEADERS_HOST = /
QUEUE_PORT = 61613
QUEUE_USER = eventhos
QUEUE_PASSWORD = secret
QUEUE_DESTINATION = eventhos
QUEUE_HEART_BEAT = 0,0

LOG_LEVEL

level (string, case insensitive) - the minimum log level that this category will send to the appenders. For example, if set to ‘error’ then the appenders will only receive log events of level ‘error’, ‘fatal’, ‘mark’ - log events of ‘info’, ‘warn’, ‘debug’, or ‘trace’ will be ignored.

Advanced configurations

- Actions - use raw function body for complex integrations

Remember that to access the parameters of the body, you must access it from the object "eventContext.httpRequest.body"

Example

image

- Obfuscate data in email error report

If you want to obsfucate data in email error report you need to declare the RAW_SENSIBLE_PARAMS variable and put the values ​​you need to obfuscate.

- Add custom subject on email error report

Declare the ENVIRONMENT_ALIAS variable and put the value.

image

⚠️ **GitHub.com Fallback** ⚠️