node package manager
Easy collaboration. Discover, share, and reuse code in your team. Create a free org ยป

node-frontend

GOV AU

Build Status on CircleCI

React frontend for GovAU health project

Description

This is the proposed front-end for the new (two-stack-cms) medicare website. The current spike uses Apollo with GraphQl to connect to Druapl and grab all the contents available

Pre Requisite

  1. Yarn or Npm
  2. Node

Getting Started

  1. Clone front-end repo locally.
  git clone git@github.com:govau-health/health-gov-frontend.git
  cd health-gov-frontend
  1. Install dependencies.
  yarn install
  or
  npm install
  1. Change app env variable

    The application configuration is based on dotenv node module Docs here

    Set the GraphQl endpoint in .env file. To set it locally either point it to your local graphQl instance or the staging environment. FYI: This is set as an environment variable in Pivotal.

Environment Variables

Variable Description
DRUPAL_GRAPHQL_API_URL Location of the graphQL endpoint for the CMS

4 A. Run build in dev mode with universal rendering

  yarn start:dev:universal
  or
  npm run start:dev:universal

  Point your browser to [http://localhost:3000](http://localhost:3000)

All scripts

npm run or yarn <script> Description
start Run your app in production mode with universal rendering.
start:dev:universal Run your app in development mode with universal rendering with server auto restarting when file change.
start:dev Run your app in development mode without universal rendering with webpack hot server auto restarting when file change.
build Compiles the application to the corresponding folder(server/ and server/static) in production mode.
build:dev Compiles the application to the corresponding folder(server/ and server/static) in dev mode.
test Runs unit tests with Jest.
lint Check for lint errors and runs for all .js and .jsx files.
lint:fix Check and fix for lint errors.

Deployment to Production

TBC

License

This source code is licensed under the MIT license.