Git Product home page Git Product logo

sexual-health-service-finder's Introduction

Sexual Health Service Finder

Helping to connect people to sexual health services.

GitHub Release Greenkeeper badge Build Status Coverage Status

Installation

Clone the repo: git clone https://github.com/nhsuk/sexual-health-service-finder.git and review the scripts to get up and running.

Testing

The application uses Docker to run in containers. Development is typically done on the host machine. Files are loaded into the container and changes are automatically updated.

Use the test script for continuous testing during development.

Test environments

As the application is being developed, every Pull Request has its own test environment automatically built and deployed to.

Every environment apart from the one we want the public to access requires basic authentication to access. The username and password are not secret, in fact they are included within environment variable table below. The intention with the authentication challenge is to prevent people whom may stumble across the site and not realise it is for testing, it also prevents access by search engines and other bots.

Environment variables

Environment variables are expected to be managed by the environment in which the application is being run. This is best practice as described by twelve-factor.

In order to protect the application from starting up without the required env vars in place require-environment-variables is used to check for the env vars that are required for the application to run successfully. This happens during the application start-up. If an env var is not found the application will fail to start and an appropriate message will be displayed.

Environment variables are used to set application level settings for each environment.

Variable Description Default Required
ADOBE_TRACKING_URL Adobe Analytics Dynamic Tag Management URL No
BASIC_AUTH An MD5 encrypted htpasswd test:test
HOTJAR_ANALYTICS_TRACKING_ID Hotjar tracking id No
GOOGLE_ANALYTICS_TRACKING_ID Google Analytics property id No
LOG_LEVEL Numeric log level Depends on NODE_ENV
NODE_ENV Node environment development
PORT Server port 3000
WEBTRENDS_ANALYTICS_TRACKING_ID Webtrends tracking id No

FAQ

  • Is the application failing to start?
    • Ensure all expected environment variables are available within the environment
    • If set, LOG_LEVEL must be a number and one of the defined log levels
    • Check for messages in the logs

Architecture Decision Records

This repo uses Architecture Decision Records to record architectural decisions for this project. They are stored in doc/adr.

sexual-health-service-finder's People

Contributors

beseven avatar bradmorton1 avatar chrimesdev avatar greenkeeper[bot] avatar greenkeeperio-bot avatar markysoft avatar mcheung-nhs avatar st3v3nhunt avatar

Watchers

 avatar  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.