Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dvsa/ext-svc-dvla-ants
https://github.com/dvsa/ext-svc-dvla-ants
Last synced: 13 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dvsa/ext-svc-dvla-ants
- Owner: dvsa
- License: mit
- Created: 2019-10-22T11:52:47.000Z (about 5 years ago)
- Default Branch: develop
- Last Pushed: 2023-05-07T02:18:50.000Z (over 1 year ago)
- Last Synced: 2024-04-15T04:43:08.234Z (9 months ago)
- Language: TypeScript
- Size: 1.35 MB
- Stars: 0
- Watchers: 5
- Forks: 1
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ext-svc-dvla-ants
#### Run AWS Lambda node functions locally with a mock API Gateway
- `npm install`
- `BRANCH=local npm start`### Git Hooks
Please set up the following prepush git hook in .git/hooks/pre-push
```
#!/bin/sh
npm run prepush && git log -p | scanrepo```
#### Security
Please install and run the following securiy programs as part of your testing process:
https://github.com/awslabs/git-secrets
- After installing, do a one-time set up with `git secrets --register-aws`. Run with `git secrets --scan`.
https://github.com/UKHomeOffice/repo-security-scanner
- After installing, run with `git log -p | scanrepo`.
These will be run as part of prepush so please make sure you set up the git hook above so you don't accidentally introduce any new security vulnerabilities.
### Testing
In order to test, you need to run the following:
- `npm run test` for unit tests
- `npm run test-i` for integration tests### Environmental variables
- The `BRANCH` environment variable indicates in which environment is this application running. Use `BRANCH=local` for local deployment. This variable is required when starting the application or running tests.
### Local Running
To run this locally, add the following environment variables to your run configuration(s):
* AWS_XRAY_CONTEXT_MISSING = LOG_ERROR
* SLS_DEBUG = *
* BRANCH = LOCALand change the serverless.yml so that Custom > DynamoDB >
* migrate: true
seed: true
noStart: false**NB: Do not push these changes. They are for local running only**