lamlha v0.2.4
Lamlha Service
Lamlha is the Marketplace service that provides routing and distance matrixes.
Key information
Prerequisites
- Set up your AWS Development Credentials
- Install Node.js
- Install AWS SAM CLI
- Install node modules:
npm i
- Install CloudFormation linter:
pip3 install cfn-lint
Directory Structure
└── src/ - all source code for project is in here
├── handlers/ - Lamda and GraphQL handlers
├── types/ - shared types, including error classes
└── utils/ - helper code and misc functions
# ├── cli/ - cli commands
# ├── data/ - all datasources are defined and exposed here
# │ └── db/ - dynamodb schema and models
# │ └── legacy/ - legacy data ie. facilities from Monorail
# ├── logic/ - all core business logic
Local Setup
Copy src/env/local.env.base to local.env
cp ./src/env/local.env.base ./src/env/local.env
Then, reach out to the team for the appropriate values to use in local.env
Testing
Run npm run test
to run the tests once.
Run npm run test:watch
to run the tests continuously.
Logs
- To enable DB logging set
DB_LOGGING=1
.
Deploying
DEV - npm run deploy:dev
STAGING - npm run deploy:staging
PROD - npm run deploy:prod
CI/CD
Using trunk based workflow
CircleCI is enabled and the project status can be viewed here
Monitoring and Error Reporting
Reference Materials
GoogleMapsApi (Directions Service): https://developers.google.com/maps/documentation/directions/get-directions#optimize-your-waypoints
GoogleMaps NodeJS Module (used in project): https://www.npmjs.com/package/@googlemaps/google-maps-services-js
GoogleMaps NodeJS Module Full Documentation: https://googlemaps.github.io/google-maps-services-js/
GoogleMaps NodeJS Module Full Documentation (Client Object): https://googlemaps.github.io/google-maps-services-js/classes/Client.html
8 months ago