This file api repo is dedicated for all files related services to handle.
- Practera CORE docker up
npm install
- Create
.env
file and modify or add parameters if neededcp env.example .env
- Run
npm run dev
to start a serverless lambda funtion on local
- Open another terminal window, under the same directory, run
node trigger.js
to trigger the lambda function
- We use DAZN Lambda Powertools as the error logging tool.
- Environment variable
LOG_LEVEL
has 4 values: DEBUG
- Display all logsINFO
- DisplayLog.info()
logs and aboveWARN
- DisplayLog.warn()
logs and aboveERROR
- DisplayLog.error()
only- Environment variable
SAMPLE_DEBUG_LOG_RATE
controls the sampling rate of debug logs - By default it is 0.01, that means we will log debug logs for 1% of the requests
- If we wanna enable debug logs for all services that is related to the current service, we can change it to 1. Note: Remember to change it back to 0.01 after debugging, as this will increase the AWS cost