A serverless microservice responsible for responsible for retrieving driver data for candidates.
All serverless functions live in dedicated directories in src/functions.
Code that is common between multiple functions should reside in src/common.
As per the principles of Hexagonal Architecture, each function has the following directories to help us separate concerns:
framework- contains all Inbound and Outbound Adapters, and all use of external/proprietary APIs - depends upon...application- contains all Inbound and Outbound Ports, doesn't use any external/proprietary APIs - depends upon...domain- contains all domain objects (Aggregates, Objects, Value classes etc) with all "business logic" (not just anaemic data holders), doesn't use any external/proprietary APIs.
Use the following script to spin up the microservice locally
npm run startTo build a zip file for every function to build/artifacts, run:
npm run packageTo build a subset of the functions, pass a comma separated list of function names, like so:
npm run package -- get,setN.b. The build requires jq.
Any functions delcared in serverless.yml that contain the word "local" will be ignored in the packaging process.
To run the unit tests, simply run:
npm run testTo run the GitHub actions locally for testing purposes, please see here: