Skip to content

Central logging service for the Vehicle Testing Application to use for recording diagnostic information

License

Notifications You must be signed in to change notification settings

dvsa/cvs-svc-app-logs

Repository files navigation

cvs-svc-app-logs

A serverless microservice responsible reporting error logs from the cvs-mobile-app

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.

Build

To build a zip file for every function to build/artifacts, run:

npm run package

To build a subset of the functions, pass a comma separated list of function names, like so:

npm run package -- get,set

N.b. The build requires jq.

Test

To run the unit tests, simply run:

npm test

Please refer to the the docs for the API specification and samples of postman requests.

If the tests return a credentials error, check ~/.aws/credentials has dummy values set up

AWS_ACCESS_KEY_ID=some_value
AWS_SECRET_ACCESS_KEY=some_value

About

Central logging service for the Vehicle Testing Application to use for recording diagnostic information

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published