Coder Social home page Coder Social logo

uk-gov-mirror / defra.international-waste-shipments-frontend-training Goto Github PK

View Code? Open in Web Editor NEW

This project forked from defra/international-waste-shipments-frontend-training

0.0 0.0 0.0 706 KB

License: Other

JavaScript 33.36% Shell 0.08% CSS 53.90% HTML 12.09% Groovy 0.57%

defra.international-waste-shipments-frontend-training's Introduction

International Waste Shipments Frontend Training

Branch Travis CI
master Build Status
develop Build Status

Maintainability Test Coverage

This repository provides a Node.js based solution for the frontend of the International Waste Shipments service. This solution exists for training purposes. The structure of this repository is based on that of Defra Hapi web boilerplate.

Environment variables

name description required default valid
NODE_ENV Node environment no development,test,production
PORT Port number no 3000
IWS_NOTIFICATION_SERVICE Notification service URL yes
IWS_SESSION_COOKIE_NAME Session cookie name no iwsSessionCookie
IWS_SESSION_TIMEOUT_IN_MINUTES Session timeout length no 15
IWS_REQUEST_TIMEOUT_IN_MILLIS Request timeout no 5000
IWS_SESSION_CACHE_NAME Session cache name no redis-cache
IWS_SESSION_CACHE_HOST Session cache hostname no localhost
IWS_SESSION_CACHE_CONTAINER_PORT Session cache Docker port no 6379
IWS_SESSION_CACHE_PORT Session cache port no 6379
IWS_SESSION_CACHE_GUI_CONTAINER_PORT Session cache GUI Docker port no 8081
IWS_SESSION_CACHE_GUI_PORT Session cache GUI port no 8081
IWS_SESSION_CACHE_PASSWORD Session cache password yes

Prerequires

Mandatory

  • Node 8.x or above
  • Redis 5.x or above (Host or Docker based)

Optional

If using Docker

  • Docker 18.06 CE or above
  • Docker Compose 1.22 or above

Running the application

First build the application using:

$ npm run build

Currently this will just build the govuk-frontend sass but may be extended to include other build tasks as needed (e.g. client-side js using browserify or webpack etc.)

Now the application is ready to run:

$ node index.js

Development user name and password

To log in to the development version of the application:

username: [email protected] password: secret

Docker Considerations

Introduction

This service uses Redis for intermediate storage. The following Docker Compose files provide Docker based Redis support for use in a local development environment.

  • docker-compose.yaml - Provides Docker containers for Redis and Redis Commander
  • docker-compose.volumes.yml - This can be used to supplement the Redis Docker container with volume support. Support is provided for a custom Redis configuration file volume and a data volume.

Running Unit Tests With Docker Based Redis

$ docker-compose up -d && npm test && docker-compose down

Running Docker Based Redis With Volumes

$ mkdir -p volumes/redisconf && mkdir -p volumes/redisdata

$ cp <</path/to/redis.conf>> volumes/redisconf/redis.conf

$ docker-compose -f docker-compose.yml -f docker-compose.volumes.yml up -d

Contributing to this project

If you have an idea you'd like to contribute please log an issue.

All contributions should be submitted via a pull request.

License

THIS INFORMATION IS LICENSED UNDER THE CONDITIONS OF THE OPEN GOVERNMENT LICENCE found at:

http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3

The following attribution statement MUST be cited in your products and applications when using this information.

defra.international-waste-shipments-frontend-training's People

Contributors

pwadmore-ea avatar pmshaw15 avatar ttea1990 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.