https://github.com/dvsa/cvs-svc-app-logs
Central logging service for the Vehicle Testing Application to use for recording diagnostic information
https://github.com/dvsa/cvs-svc-app-logs
cvs-project
Last synced: over 1 year ago
JSON representation
Central logging service for the Vehicle Testing Application to use for recording diagnostic information
- Host: GitHub
- URL: https://github.com/dvsa/cvs-svc-app-logs
- Owner: dvsa
- License: mit
- Created: 2019-06-06T14:14:21.000Z (about 7 years ago)
- Default Branch: develop
- Last Pushed: 2024-10-24T16:04:34.000Z (almost 2 years ago)
- Last Synced: 2024-10-25T06:32:18.514Z (almost 2 years ago)
- Topics: cvs-project
- Language: TypeScript
- Homepage:
- Size: 912 KB
- Stars: 0
- Watchers: 6
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:
```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).
## Test
To run the unit tests, simply run:
```shell
npm test
```
Please refer to the the [docs](./docs/README.md) 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
```