Skip to content

ONSdigital/dp-frontend-release-calendar

Repository files navigation

dp-frontend-release-calendar

Release Calendar frontend controller

Provides server side rendering of the Release Calendar and Release pages.

A Release Calender page is constructed from metadata drawn from the Search API. See search service architecture docs here

A Release page is constructed from the data drawn from the Release API.

Getting started

Run make help to see full list of make targets.

  • Run the Digital Publishing Design System (dp-design-system) in a separate shell with ./run.sh
  • Run make debug
  • In your browser, visit one of:
    • http://localhost:27700/releasecalendar
    • http://localhost:27700/releases/{topic} where {topic} exists in zebedee/master/releases/
  • For document data underlying each page, visit one of:
    • http://localhost:27700/releasecalendar/data
    • http://localhost:27700/releases/{topic}/data

Dependencies

  • No further dependencies other than those defined in go.mod

Configuration

Environment variable Default Description
API_ROUTER_URL http://localhost:23200/v1 The URL of the dp-api-router
BIND_ADDR :27700 The host and port to bind to
DEBUG false Enable debug mode
DEFAULT_LIMIT 10 The default size of (number of search results on) a page
DEFAULT_MAXIMUM_LIMIT 100 The default maximum size of (number of search results on) a page
DEFAULT_MAXIMUM_SEARCH_RESULTS 1000 The default maximum number of search results that will be paged
DEFAULT_SORT "release_date_desc" The default sort order of search results
GRACEFUL_SHUTDOWN_TIMEOUT 5s The graceful shutdown timeout in seconds (time.Duration format)
HEALTHCHECK_CRITICAL_TIMEOUT 90s Time to wait until an unhealthy dependent propagates its state to make this app unhealthy (time.Duration format)
HEALTHCHECK_INTERVAL 30s Time between self-healthchecks (time.Duration format)
IS_PUBLISHING false Mode in which the service is running
PATTERN_LIBRARY_ASSETS_PATH "" Pattern library location
ROUTING_PREFIX "" Any routing prefix for the service
SITE_DOMAIN localhost
SUPPORTED_LANGUAGES []string{"en", "cy"} Supported languages

Contributing

See CONTRIBUTING for details.

License

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

Released under MIT license, see LICENSE for details.