Connect to Eco-Visio API and load pedestrian and bicycle counts into db.
Run daily to pull bicycle and pedestrian counts and load them into database.
Plan is to publicly display on a dashboard.
Run without parameters for yesterday's data. These parameters can be added to Lambda in test mode:
{ "begin": "2023-02-17T00:00:00.000Z", "end": "2023-02-18T00:00:00.000Z" }
{ "getall": true }
The secret eco-visio is added to AWS Secrets Manager { "api_url": "https://apieco.eco-counter-tools.com/", "auth_endpoint": "token", "api_key": '', "list_sites_endpoint": "api/1.0/site", "data_endpoint": "api/1.0/data/site", "db_host": "", "db_user": "", "db_port": "5432", "db_password": "", "db_database": "", }
A file named .env is required in the root dir. The format required is shown in env.example.
- Test Locally: npm start
- Deploy:
- npm run deploy prod
- npm run deploy dev
- Destroy: (removes all objects from AWS)
- npm run destroy prod
- npm run destroy dev
- Clean: npm run clean (removes local temp files)