Skip to content

Latest commit

 

History

History
52 lines (32 loc) · 1.56 KB

File metadata and controls

52 lines (32 loc) · 1.56 KB

Factern Demo over Companies House using GraphQL and GraphiQL

What is this repository for?

Our Demo provides a portal for querying of companies available on Companies House, with the ability to add and respond to comments on particular companies.

The front-end is strictly GraphiQL, and runs against production Factern.

What do you need?

To build:

  • npm install
  • npm run-script build

To run:

Environment Variables

Some environment variables are required to define your configuration:

export FACTERN_LOGIN_ID='YOUR_FACTERN_LOGIN_ID'
export OAUTH_CLIENT_ID='YOUR_OAUTH_CLIENT_ID'
export OAUTH_CLIENT_SECRET='YOUR_OAUTH_CLIENT_SECRET'
export COMPANY_HOUSE_KEY='YOUR_COMPANY_HOUSE_KEY'

Note that Companies House uses Basic access authentication with the API key treated as the user and the password left blank. Hence, you will need to take your API key, suffix it with ':', and provide the base64 encoding of this result to Factern as YOUR_COMPANY_HOUSE_KEY.

Start

  • npm start

Frontend:

In another terminal in the erchl-frontend directory with the same environment variables set

  • npm install
  • npm run-script replace-vars
  • npm start

To use: