https://github.com/defra/cyltfr-service
Check Your Long Term Flood Risk service
https://github.com/defra/cyltfr-service
Last synced: about 1 month ago
JSON representation
Check Your Long Term Flood Risk service
- Host: GitHub
- URL: https://github.com/defra/cyltfr-service
- Owner: DEFRA
- Created: 2024-06-24T14:28:51.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-11-27T12:06:48.000Z (6 months ago)
- Last Synced: 2025-11-30T04:56:44.605Z (6 months ago)
- Language: JavaScript
- Size: 67.8 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
[](https://sonarcloud.io/dashboard?id=DEFRA_cyltfr-service)
[](https://sonarcloud.io/dashboard?id=DEFRA_cyltfr-service)
[](https://sonarcloud.io/dashboard?id=DEFRA_cyltfr-service)
[](https://sonarcloud.io/dashboard?id=DEFRA_cyltfr-service)
[](https://sonarcloud.io/dashboard?id=DEFRA_cyltfr-service)
[](https://sonarcloud.io/dashboard?id=DEFRA_cyltfr-service)
[](https://sonarcloud.io/dashboard?id=DEFRA_cyltfr-service)
[](https://sonarcloud.io/dashboard?id=DEFRA_cyltfr-service)
[](https://sonarcloud.io/dashboard?id=DEFRA_cyltfr-service)
[](https://standardjs.com)
[](https://github.com/facebook/jest)
[](https://github.com/DEFRA/cyltfr-service/issues/)
[]()
[]()
[](http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3)
# Check Your Long Term Flood Risk Services (cyltfr-service)
Repo for the Check Your Long Term Flood (CYLTFR) services back end service.
This repository is part of the CYLTFR service which also includes:\
\
\
## Prerequisites
Node v22.x/
Docker v20.10.0+
### Start service
`npm start`
### Test service
`npm test`
### Use service
do http `GET` on `http://{host}:{port}/floodrisk/{x}/{y}`
# Environment variables
| name | description | required | default | valid | notes |
|---------------------|--------------------------------|:---------:|-------------|:-----------------------------:|-------|
| NODE_ENV | Node environment | no | dev | dev,test,prod-green,prod-blue | |
| HOST | Hostname | no | 0.0.0.0 | | |
| PORT | Port number | no | 3000 | | |
| DATA_VERSION | Version number of data | no | 01 | | |
| PERFORMANCE_LOGGING | Log detailed query times | no | false | | |
| RISK_DATA_URL | Url of the cyltfr-data service | yes | | | |
| ESRI_CLIENT_ID | Client ID number for ESRI | yes | | | |
| ESRI_CLIENT_SECRET | ESRI Client secret | yes | | | |
# Prerequisites
Node v20+
# Running the application locally
`$ node index.js`
# Debugging the application in docker using vscode
First build the debug image using
`$ npm run container:builddebug`
Configure vscode using a debug configuration launch.json like
```json
{
"version": "0.2.0",
"configurations": [
{
"address": "0.0.0.0",
"name": "Attach",
"port": 9229,
"request": "attach",
"skipFiles": [
"/**"
],
"localRoot": "${workspaceFolder}",
"remoteRoot": "/home/node/app",
"type": "node"
}
]
}
```
Then you can run the container in debug mode using
`$ npm run container:debug`
or
`$ npm run cd`
This maps your source directory into the container, so that you can make changes locally and they'll be reflected in the container.
If you have auto-attach configured in vscode you might need to disable it for this to work.
When you have finished end the debug container using
`$ npm run container:stopdebug`
or
`$ npm run cx`
## License
THIS INFORMATION IS LICENSED UNDER THE CONDITIONS OF THE OPEN GOVERNMENT LICENCE found at:
The following attribution statement MUST be cited in your products and applications when using this information.
>Contains public sector information licensed under the Open Government licence v3
### About the license
The Open Government Licence (OGL) was developed by the Controller of His Majesty's Stationery Office (HMSO) to enable information providers in the public sector to license the use and re-use of their information under a common open licence.
It is designed to encourage use and re-use of information freely and flexibly, with only a few conditions.