{"id":20038747,"url":"https://github.com/defra/flood-service","last_synced_at":"2025-08-22T01:06:11.004Z","repository":{"id":39579937,"uuid":"156529764","full_name":"DEFRA/flood-service","owner":"DEFRA","description":"Check flood risk - alpha - flood-service","archived":false,"fork":false,"pushed_at":"2025-06-25T14:43:58.000Z","size":1149,"stargazers_count":5,"open_issues_count":15,"forks_count":2,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-06-25T15:19:22.611Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://flood-alpha.aws.defra.cloud/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","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":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-11-07T10:29:38.000Z","updated_at":"2025-06-06T10:12:47.000Z","dependencies_parsed_at":"2023-10-10T15:15:21.967Z","dependency_job_id":"18471809-623d-4b4f-82ba-a1781669f73b","html_url":"https://github.com/DEFRA/flood-service","commit_stats":null,"previous_names":[],"tags_count":58,"template":false,"template_full_name":null,"purl":"pkg:github/DEFRA/flood-service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fflood-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fflood-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fflood-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fflood-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DEFRA","download_url":"https://codeload.github.com/DEFRA/flood-service/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fflood-service/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262352619,"owners_count":23297689,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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:32:28.470Z","updated_at":"2025-06-28T00:05:01.425Z","avatar_url":"https://github.com/DEFRA.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Build status](https://github.com/DEFRA/flood-service/actions/workflows/ci.yml/badge.svg)[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=DEFRA_flood-service\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=DEFRA_flood-service)[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=DEFRA_flood-service\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=DEFRA_flood-service)\n\n# flood-service\n\nThis is the service tier node application supporting the Check for flooding service https://github.com/DEFRA/flood-app\n\n## Environment variables\n\nCreate a .env file at the root of the project to set your environment variables locally, which is especially useful during development. The [dotenv](https://www.npmjs.com/package/dotenv) package facilitates this by automatically loading these variables at application start. This approach is recommended as a simpler alternative to global settings, like those in .bashrc. \n\nFor DEFRA employees, these environment variables are available in our private lfwconfig repository.\n\n| name                              | description            | required | default     | valid                               | notes |\n|-----------------------------------|------------------------|:--------:|-------------|-------------------------------------|-------|\n| NODE_ENV                          | Node environment       |    no    | production  | development, dev, test, tst, production |       |\n| PORT                              | Port number            |    no    | 3000        |                                     |       |\n| FLOOD_SERVICE_CONNECTION_STRING   | PG Connection String   |    yes   |             |                                     |       |\n| FLOOD_SERVICE_S3_ACCESS_KEY       | S3 Access Key          |    yes   |             |                                     |       |\n| FLOOD_SERVICE_S3_SECRET_ACCESS_KEY| S3 Secret Key          |    yes   |             |                                     |       |\n| FLOOD_SERVICE_S3_BUCKET           | S3 Bucket              |    yes   |             |                                     |       |\n| FLOOD_SERVICE_S3_TIMEOUT          | S3 Http Timeout        |    no    | 10000 (10s) |                                     |       |\n| ERRBIT_PROJECT_KEY                | Errbit Project Key     |    no    |             |                                     |       |\n| ERRBIT_ENABLED                    | Errbit Enabled         |    no    |             |                                     |       |\n\n\n## Prerequisites\n\nLocal or remote Postgres/Postgis database installed from: https://github.com/DEFRA/flood-db, connection string `FLOOD_SERVICE_CONNECTION_STRING`\n\nAWS serverless lfw-data tier processing telemetry, forecast, 5DF, fwis data and storing in the database: https://github.com/DEFRA/lfw-data\n\nS3 Bucket storing some of the processed data files, referred to as `FLOOD_SERVICE_S3_BUCKET` in the env vars\n\nNode v8+\n\n## Testing the application\n\n```\n$ npm i\n$ npm run test\n```\n\n## Running the application\n\n```\n$ npm i\n$ npm run start:local\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefra%2Fflood-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefra%2Fflood-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefra%2Fflood-service/lists"}