AWS Lambda function to process user's co2 saving data to enjoy Cycle2work.
After cloning the repository, run npm install or yarn to install all dependencies.
Activities reports are scoped by month, year and athlete id:
{
_id, // Scoped by `${activity.athlete.id}${year}${month}`
year, // YYYY
month, // MM
activities: [], // Array containing all the athlete activities for this report
distances: [] // Deprecated: array containing all the distances of the athlete activities, use `activities` property instead since this property could contains duplicated activities
}The lambda can be configured using a dotenv file (key=value format).
Example of .env file:
MONGODB_URL="mongodb://localhost:27017/test"
LOG_LEVEL=debug