{"id":20038604,"url":"https://github.com/defra/cyltfr-service","last_synced_at":"2026-04-27T16:00:55.169Z","repository":{"id":246009581,"uuid":"819452032","full_name":"DEFRA/cyltfr-service","owner":"DEFRA","description":"Check Your Long Term Flood Risk service","archived":false,"fork":false,"pushed_at":"2025-11-27T12:06:48.000Z","size":71117,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-11-30T04:56:44.605Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DEFRA.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-24T14:28:51.000Z","updated_at":"2025-10-21T08:49:41.000Z","dependencies_parsed_at":"2024-06-25T10:53:38.058Z","dependency_job_id":"ef3bc1f7-eaee-421b-bc43-e1bb8d5c1793","html_url":"https://github.com/DEFRA/cyltfr-service","commit_stats":null,"previous_names":["defra/cyltfr-service"],"tags_count":97,"template":false,"template_full_name":null,"purl":"pkg:github/DEFRA/cyltfr-service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fcyltfr-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fcyltfr-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fcyltfr-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fcyltfr-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DEFRA","download_url":"https://codeload.github.com/DEFRA/cyltfr-service/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fcyltfr-service/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32343571,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T10:30:16.860Z","updated_at":"2026-04-27T16:00:55.152Z","avatar_url":"https://github.com/DEFRA.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=DEFRA_cyltfr-service\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=DEFRA_cyltfr-service)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=DEFRA_cyltfr-service\u0026metric=sqale_rating)](https://sonarcloud.io/dashboard?id=DEFRA_cyltfr-service)\n[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=DEFRA_cyltfr-service\u0026metric=reliability_rating)](https://sonarcloud.io/dashboard?id=DEFRA_cyltfr-service)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=DEFRA_cyltfr-service\u0026metric=security_rating)](https://sonarcloud.io/dashboard?id=DEFRA_cyltfr-service)\n[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=DEFRA_cyltfr-service\u0026metric=ncloc)](https://sonarcloud.io/dashboard?id=DEFRA_cyltfr-service)\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=DEFRA_cyltfr-service\u0026metric=bugs)](https://sonarcloud.io/dashboard?id=DEFRA_cyltfr-service)\n[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=DEFRA_cyltfr-service\u0026metric=code_smells)](https://sonarcloud.io/dashboard?id=DEFRA_cyltfr-service)\n[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=DEFRA_cyltfr-service\u0026metric=sqale_index)](https://sonarcloud.io/dashboard?id=DEFRA_cyltfr-service)\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=DEFRA_cyltfr-service\u0026metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=DEFRA_cyltfr-service)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n[![Jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest)\n[![GitHub issues](https://img.shields.io/github/issues/DEFRA/cyltfr-service.svg)](https://github.com/DEFRA/cyltfr-service/issues/)\n[![Code size](https://img.shields.io/github/languages/code-size/DEFRA/cyltfr-service.svg)]()\n[![Repo size](https://img.shields.io/github/repo-size/DEFRA/cyltfr-service.svg)]()\n[![Licence](https://img.shields.io/badge/licence-OGLv3-blue.svg)](http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3)\n\n# Check Your Long Term Flood Risk Services (cyltfr-service)\nRepo for the Check Your Long Term Flood (CYLTFR) services back end service.\n\nThis repository is part of the CYLTFR service which also includes:\\\n\u003chttps://github.com/DEFRA/cyltfr-app\u003e\\\n\u003chttps://github.com/DEFRA/cyltfr-data\u003e\\\n\u003chttps://github.com/DEFRA/cyltfr-admin\u003e\n\n## Prerequisites\nNode v22.x/\nDocker v20.10.0+\n\n### Start service\n\n`npm start`\n\n### Test service\n\n`npm test`\n\n### Use service\n\ndo http `GET` on `http://{host}:{port}/floodrisk/{x}/{y}`\n\n# Environment variables\n| name                | description                    | required  |   default   |            valid              | notes |\n|---------------------|--------------------------------|:---------:|-------------|:-----------------------------:|-------|\n| NODE_ENV            | Node environment               |    no     | dev         | dev,test,prod-green,prod-blue |       |\n| HOST                | Hostname                       |    no     | 0.0.0.0     |                               |       |\n| PORT                | Port number                    |    no     | 3000        |                               |       |\n| DATA_VERSION        | Version number of data         |    no     | 01          |                               |       |\n| PERFORMANCE_LOGGING | Log detailed query times       |    no     | false       |                               |       |\n| RISK_DATA_URL       | Url of the cyltfr-data service |    yes    |             |                               |       |\n| ESRI_CLIENT_ID      | Client ID number for ESRI      |    yes    |             |                               |       |\n| ESRI_CLIENT_SECRET  | ESRI Client secret             |    yes    |             |                               |       |\n\n# Prerequisites\n\nNode v20+\n\n# Running the application locally\n\n`$ node index.js`\n\n# Debugging the application in docker using vscode\n\nFirst build the debug image using\n\n`$ npm run container:builddebug`\n\nConfigure vscode using a debug configuration launch.json like\n\n```json\n{\n  \"version\": \"0.2.0\",\n  \"configurations\": [\n    {\n      \"address\": \"0.0.0.0\",\n      \"name\": \"Attach\",\n      \"port\": 9229,\n      \"request\": \"attach\",\n      \"skipFiles\": [\n        \"\u003cnode_internals\u003e/**\"\n      ],\n      \"localRoot\": \"${workspaceFolder}\",\n      \"remoteRoot\": \"/home/node/app\",\n      \"type\": \"node\"\n    }\n  ]\n}\n```\n\nThen you can run the container in debug mode using\n\n`$ npm run container:debug`\n\nor \n\n`$ npm run cd`\n\nThis maps your source directory into the container, so that you can make changes locally and they'll be reflected in the container.\n\nIf you have auto-attach configured in vscode you might need to disable it for this to work.\n\nWhen you have finished end the debug container using\n\n`$ npm run container:stopdebug`\n\nor \n\n`$ npm run cx`\n\n## License\nTHIS INFORMATION IS LICENSED UNDER THE CONDITIONS OF THE OPEN GOVERNMENT LICENCE found at:\n\n\u003chttp://www.nationalarchives.gov.uk/doc/open-government-licence/version/3\u003e\n\nThe following attribution statement MUST be cited in your products and applications when using this information.\n\n\u003eContains public sector information licensed under the Open Government licence v3\n\n### About the license\nThe 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.\n\nIt is designed to encourage use and re-use of information freely and flexibly, with only a few conditions.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefra%2Fcyltfr-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefra%2Fcyltfr-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefra%2Fcyltfr-service/lists"}