Documentation for the service can be found in the /docs/ folder.
- Docker and docker-compose
- Nodejs and Yarn
Install dependencies for development
yarn install
Bring the service up
make up
make run-cypress
Cypress is run locally rather than in docker. To ensure version parity of nodeJS use a version manager, such as asdf, to parse .tool-versions
:
asdf install
To run the app in dev mode:
make up-dev
Dev mode adds hot reloading via air which
will watch .go
and .gohtml
for changes and recompile the app.
It also enables debugging via delve. Delve
runs on localhost:2345
- add this to your editor/IDE debug config settings and
then add breakpoints to step through the app code when running on
localhost. Example VSCode debug config:
{
"name": "Go remote debug",
"type": "go",
"request": "attach",
"mode": "remote",
"port": 2345,
"host": "127.0.0.1",
"trace": "verbose"
}
We use Pact for contract tests. To install the necessary tools to run the tests do:
go install github.com/pact-foundation/pact-go/v2
pact-go install
We make use of mockery for generating mocks
and enumerator for generating enums. To use you'll need
to go install ./cmd/enumerator
, then running make go-generate
will
create code from any declarations.
The OPG Modernising LPA code in this repository is released under the MIT license, a copy of which can be found in LICENCE.