Skip to content

Front-end application for ALL the microservices

License

Notifications You must be signed in to change notification settings

derkkila/front-end

 
 

Repository files navigation

Build Status

Front-end app

Front-end application written in Node.js that puts together all of the microservices under microservices-demo.

Situational configurations

This application has been coded to behave specific ways based on various configurations and inputs to simulate real world issues application developers will face. The table below outlines these configurations

Situation Configuration Manifestation
Simulate login from Google or Facebook IdP Provide request header "IdentityProvider" on login request. Google or Facebook. Omit header for default Buttercup Games IdP Will emit an information log in front-end winston logs indicating the identity provider used during the authentication request. Will fail the authentication request and emit log if header is not Google, Facebook or Buttercup_Games
Simulate login failures for Buttercup Game IdP Touch file ./runtime_config/break_buttercup on front-end container. Remove file to restore operations Will fail all authorization requests for Buttercup Games IdP and emit error log to front-end winston logs
Simulate intermittent 500 failures to page requests Modify file ./runtime_config/request_failure_percentage with single number on line one between 0 and 100 representing the percent probability that the request will fail. 100 will fail every request. Remove file to restore operations Will result in http request from webserver returning a 500 error and emit error log to front-end winston logs
Defect in code: Sport filter does not work as intended Simply select and apply the sport filter on the catalog page The code improperly ignores the filter and returns all socks to the end user

Build

Dependencies

Name Version
Docker >= 1.12
Docker Compose >= 1.8.0
Make (optional) >= 4.1

Node

npm install

Docker

make test-image

Docker Compose

make up

Test

Make sure that the microservices are up & running

Unit & Functional tests:

make test

End-to-End tests:

To make sure that the test suite is running against the latest (local) version with your changes, you need to manually build the image, run the container and attach it to the proper Docker networks. There is a make task that will do all this for you:

make dev

That will also tail the logs of the container to make debugging easy. Then you can run the tests with:

make e2e

Run

Node

npm start

Docker

make server

Use

Node

curl http://localhost:8081

Docker Compose

curl http://localhost:8080

Push

GROUP=weaveworksdemos COMMIT=test ./scripts/push.sh

About

Front-end application for ALL the microservices

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 52.8%
  • JavaScript 44.6%
  • CSS 2.1%
  • Other 0.5%