Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

lm-tools/choose-your-activities

Repository files navigation

Choose Your Activities

Build status

Choose Your Activities app, based on express, which looks like gov.uk

Deploy

Dev setup

Use node 6.11.1 and npm >5. Setup with nvm:

$ nvm install 6.11.1
$ npm install -g npm@5.2.0

Ensure node_modules/.bin is on your path

Make sure that [PostgreSQL] is running, and that your current user ($ whoami) has full access. Alternatively, custom database details can be provided by setting a DATABASE_URL environment variable to a valid [PostgreSQL connection string]

Note : For Catalina with XCode installed, run the following commands

$ sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
$ export CXXFLAGS="-mmacosx-version-min=10.9"
$ export LDFLAGS="-mmacosx-version-min=10.9" 

Setup the application:

$ docker run --name cya-postgres -e POSTGRES_PASSWORD=password -d -p 5432:5432 postgres
$ docker exec -it cya-postgres /bin/bash
$ psql -U postgres -c "create database choose_your_activities;"
$ psql -U postgres -c "create database choose_your_activities_test;"
$ export DATABASE_URL=postgres://postgres:password@localhost/choose_your_activities
$ npm install
$ npm run db-migrate
$ npm run watch

Mounting the application in a directory

The app will run mounted at / by default. To run within a directory, set the EXPRESS_BASE_PATH environment variable.

For example, to mount the application at /choose-your-activities, run:

$ EXPRESS_BASE_PATH=/choose-your-activities npm run start

Google tag manager

To enable google tag manager pass GOOGLE_TAG_MANAGER_ID environment variable

$ GOOGLE_TAG_MANAGER_ID=<GTM-ID> npm run start

Check for dead links

$ npm run check-content

Note:

If you behind proxy run this instead:

NODE_TLS_REJECT_UNAUTHORIZED=0 npm run check-content

Performance tests

Performance tests are described here

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published