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 |
BABBAGE_MAXAGE_KEY |
"" |
The key required to get the max age value from babbage |
BABBAGE_URL |
http://localhost:8080 |
The URL of babbage |
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 |
ENABLE_BABBAGE_CALCULATED_MAX_AGE |
true |
If true use Babbage to calculate max age for cache headers |
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) |
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.