Skip to content

alphagov/emergency-alerts-govuk

Repository files navigation

emergency-alerts-govuk

Website for emergency alerts, hosted under /alerts on GOV.UK.

* Note that, even when connected to the VPN, you may see a 403 Forbidden page due to an issue with the way GOV.UK Fastly is configured with Fastly shielding.

Setting up to run the gov.uk/alerts locally

Local Development Environment Setup

Ensure that you have first followed all of the local development environment setup steps, that can be found here, before attempting to run the gov.uk/alerts locally.

Python version

You can find instructions on setting the correct Python version here.

NodeJS & NPM

If you don't have NodeJS on your system, install it with homebrew.

brew install node

nvm is a tool for managing different versions of NodeJS. Follow the guidance on nvm's github repository to install it.

Once installed, run the following to switch to the version of NodeJS for this project. If you don't have that version, it should tell you how to install it.

nvm use

Additional Dependencies for Macbook M1 Pro Users

To compile and run the project you need the following

brew install proj
brew install geos

Pre-commit

  • If pre-commit is not already installed on your machine, run brew install pre-commit

  • In this repository’s folder, run pre-commit install and pre-commit install-hooks

To run the application

The instructions to run the gov.uk/alerts server can be found here.

We aim to match the browsers supported by GOVUK Frontend (includes Internet Explorer 8-10).

Any Python code changes you make should be picked up automatically in development. If you're developing JavaScript code, run npm run watch to achieve the same.

This app can also be run as a Celery worker, but this is currently broken on some machines. See #214

To test the application

The instructions for running the unit tests for gov.uk/alerts server can be found here.

To continuously run js tests, run npm run test-watch.

To run a specific JavaScript test, you'll need to copy the full command from package.json.

Further documentation