Categorygithub.com/ONSdigital/dp-frontend-homepage-controller

# README

dp-frontend-homepage-controller

Getting started

To run this service

  1. Run sixteens locally using npm run dev
  2. Run make debug to start the service on http://localhost:24400

Dependencies

  • sixteens - Serves CSS and JS for the page
  • dp-design-system
  • golang 1.24.x
  • zebedee
  • dp-topic-api
  • No further dependencies other than those defined in go.mod

Configuration

ConfigDescriptionDefault
API_ROUTER_URLThe URL of the dp-api-routerhttp://localhost:23200/v1
BIND_ADDRThe Port to run on:24400
CACHE_CENSUS_TOPICS_UPDATE_INTERVALDuration for census topic cache updates1 minute
CACHE_NAVIGATION_UPDATE_INTERVALDuration for navigation cache updates1 minute
CACHE_UPDATE_INTERVALDuration for homepage cache updation10 seconds
CENSUS_TOPIC_IDRoot census id (for getting census topics)4445
DATASET_FINDER_ENABLEDDisplays link to dataset finderfalse
DEBUG
ENABLE_CENSUS_TOPIC_SUBSECTIONDisplays topics subsectionfalse
ENABLE_CUSTOM_DATASETDisplays link to custom dataset builderfalse
ENABLE_GET_DATA_CARDDisplays Get Data Cardfalse
ENABLE_NEW_NAVBAREnables Topic API driven Nav barfalse
FEEDBACK_API_URL
GRACEFUL_SHUTDOWN_TIMEOUTTime to wait during graceful shutdown5 seconds
HEALTHCHECK_CRITICAL_TIMEOUTAmount of time to pass since last healthy health check to be deemed a critical failure90 seconds
HEALTHCHECK_INTERVALInterval between health checks30 seconds
OTEL_BATCH_TIMEOUT5sInterval between pushes to OT Collector
OTEL_EXPORTER_OTLP_ENDPOINThttp://localhost:4317URL for OpenTelemetry endpoint
OTEL_SERVICE_NAME"dp-frontend-homepage-controller"Service name to report to telemetry tools
OTEL_ENABLEDfalseFeature flag to enable OpenTelemetry
IS_PUBLISHING_MODEMode in which service is runningfalse
PATTERN_LIBRARY_ASSETS_PATH
SERVICE_AUTH_TOKEN
SIXTEENS_VERSIONHomepage still uses a Sixteens version for styling
SITE_DOMAINlocalhost
SUPPORTED_LANGUAGESLanguages which are supported separated by commaen,cy

Contributing

See CONTRIBUTING for details.

License

Copyright © 2025, Office for National Statistics (https://www.ons.gov.uk)

Released under MIT license, see LICENSE for details.

# Packages

assets in locale and templates folders are converted into Go source code with go-bindata the data.go file in this package is auto generated through the generate-dev and generate-prod tasks in the Makefile.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

BuildTime represents the time in which the service was built.
GitCommit represents the commit (SHA-1) hash of the service that is running.
Version represents the version of the service that is running.