https://github.com/dvsa/mes-driver-service
A service to obtain candidate licence information
https://github.com/dvsa/mes-driver-service
Last synced: 3 months ago
JSON representation
A service to obtain candidate licence information
- Host: GitHub
- URL: https://github.com/dvsa/mes-driver-service
- Owner: dvsa
- License: mit
- Created: 2022-09-26T12:33:26.000Z (over 3 years ago)
- Default Branch: develop
- Last Pushed: 2025-11-26T11:10:34.000Z (7 months ago)
- Last Synced: 2025-11-29T09:47:37.481Z (7 months ago)
- Language: TypeScript
- Homepage:
- Size: 1.01 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mes-driver-service
A serverless microservice responsible for responsible for retrieving driver data for candidates.
## Structure
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.
## Run locally
Use the following script to spin up the microservice locally
```shell
npm run start
```
## Build
To build a zip file for every function to `build/artifacts`, run:
```shell
npm run package
```
To build a subset of the functions, pass a comma separated list of function names, like so:
```shell
npm run package -- get,set
```
*N.b. The build requires [jq](https://github.com/stedolan/jq).*
*Any functions delcared in serverless.yml that contain the word "local" will be ignored in the packaging process.*
## Test
To run the unit tests, simply run:
```shell
npm run test
```
## Testing workflows locally
To run the GitHub actions locally for testing purposes, please see here:
https://github.com/nektos/act