Giter Club home page Giter Club logo

onsdigital.dp-frontend-renderer's Introduction

dp-frontend-renderer

Configuration

Environment variable Default Description
BIND_ADDR :20000 The host and port to bind to
DEBUG false Enable debug mode
SITE_DOMAIN ons.gov.uk Domain for the website
PATTERN_LIBRARY_ASSETS_PATH Pattern library location
SUPPORTED_LANGUAGES [2]string{"en", "cy"} languages supported
GRACEFUL_SHUTDOWN_TIMEOUT 5s The graceful shutdown timeout
HEALTHCHECK_INTERVAL 30s Time between calls to healthchecks
HEALTHCHECK_CRITICAL_TIMEOUT 90s Timeout to consider a failing healthcheck critical

Adding new page types

  1. Create the page model in https://github.com/ONSdigital/dp-frontend-models
  • you'll need to update the vendored copy - govendor update github.com/ONSdigital/dp-frontend-models
  1. Create a new handler - use handlers/homepage/handler.go as an example
  • render.Handler will take care of setting global variables, e.g. language
  • the func() passed in should be used for any page-specific customisations
  1. Create a route in main.go

NOTE: Code development / testing

Vscode in helpers.go and service.go does not see assets.Asset and assets.AssetNames so debugging won't play ball, and this is expected because the command line make commands utilise go generate to create the required functions in data.go ...

So - at the command line, make debug, etc are OK.

Licence

Copyright ยฉโ€Ž 2016, Office for National Statistics (https://www.ons.gov.uk)

Released under MIT license, see LICENSE for details.

onsdigital.dp-frontend-renderer's People

Contributors

andre-urbani avatar angelalw avatar boxadesign avatar carlhembrough avatar crispioso avatar daillew avatar dandwal avatar davidsubiros avatar eldeal avatar ian-kent avatar janderson2 avatar jondewijones avatar justinpjose avatar lloydgriffiths avatar mattelcock avatar mattrout92 avatar mwnicks avatar noelledl avatar redhug1 avatar richard-95 avatar robchamberspfc avatar sandypadmanabhan avatar tgandrews avatar yetanothermatt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.