npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@defra-fish/gafl-webapp-service

v1.45.0

Published

The websales frontend for the GAFL service

Downloads

1,747

Readme

gafl-webapp-service

The web and telesales service buying a rod fishing licence; for https://www.gov.uk/fishing-licences

To run from this directory:

node src/gafl-webapp-service.js

Environment variables

| name | description | required | default | valid | | --------------------------------- | ---------------------------------------------------------------- | :------: | --------------------------------------------------------- | ----------------------------- | | NODE_ENV | Node environment | no | | development, test, production | | HAPI_KEEP_ALIVE_TIMEOUT_MS | Configure the keep-alive timeout on the server listener | no | 1 minute | | | PORT | The http port the listens on | no | 3000 | | | REDIS_HOST | Hostname of the redis instance used for session caching | yes | | | | REDIS_PORT | Port number of the redis instance used for session caching | no | 6379 | | | REDIS_PASSWORD | Password used to authenticate with the configured redis instance | no | | | | CHANNEL | The sales channel | no | websales | websales, telesales | | SESSION_COOKIE_NAME | Name of the session cookie | no | sid | | | CSRF_TOKEN_COOKIE_NAME | Name of the CSRF token cookie | no | rlsctkn | | | SESSION_COOKIE_PASSWORD | Encryption key for the session cookie (at least 32 characters) | yes | | | | SESSION_TTL_MS | Time to live for the session cookie and cache | no | 10800000 | | | ADDRESS_LOOKUP_URL | Location of address lookup facade | no | | | | ADDRESS_LOOKUP_KEY | The API key required by OS places | no | | | | ADDRESS_LOOKUP_TIMEOUT_MS | The timeout in milliseconds for the lookup | no | 10000 | | | SALES_API_URL | The address of the sales api | no | http://0.0.0.0:4000 | | | SALES_API_TIMEOUT_MS | The timeout in milliseconds requests to the api | no | 10000 | | | GOV_PAY_API_URL | The GOV.UK Pay API base url | no | Yes | | | GOV_PAY_APIKEY | GOV pay access identifier | no | Yes | | | GOV_PAY_REQUEST_TIMEOUT_MS | Timeout in milliseconds for API requests | no | Yes | | | FEEDBACK_URI | Location of feedback survey | no | # | | | ANALYTICS_PRIMARY_PROPERTY | Analytics ID for tracking inc ecommerce | no | | | | ANALYTICS_PROPERTY_API | Analytics property API key for linking Analytics.google property | no | | | | SERVICE_PAGE | GOV.UK service page | no | https://www.gov.uk/fishing-licences/buy-a-fishing-licence | | | AIRBRAKE_HOST | URL of airbrake host | no | | | | AIRBRAKE_PROJECT_KEY | Project key for airbrake logging | no | | | | SHOW_WELSH_CONTENT | Display option to change to welsh language | no | | | | ENABLE_ANALYTICS_OPT_IN_DEBUGGING | Set log if analytics been checked in non-production | no | | | | ERROR_PAGE_ROUTE | Display error pages to support welsh language | no | | | | SHOW_RECURRING_PAYMENTS | Display option to show recurring payments joruney | no | | |

OS Places address lookup

The address lookup can be port-forwarded locally to test the find-address page with a command similar to the following;

ssh -L 9002:TSFSAB01:9002 TSFSWS01

Where TSFSWS01 is a development instance with access to the facade at TSFSAB01. Details can be found here https://rattic-ops.aws-int.defra.cloud/cred/detail/1713/ . Don't forget to start the environment!

Then set the URL as follows

set ADDRESS_LOOKUP_URL=http://localhost:9002/address-service/v1/addresses/postcode-and-premises

An address lookup key will also need to be set.

GOV.UK pay setup

The details of the GOV.UK payment API can be found here; https://docs.payments.service.gov.uk/#gov-uk-pay-technical-documentation