1.0.0 • Published 6 years ago

node-frontend v1.0.0

Weekly downloads
2
License
MIT
Repository
-
Last release
6 years ago

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
  2. Install dependencies.

      yarn install
      or
      npm install
  3. 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

VariableDescription
DRUPAL_GRAPHQL_API_URLLocation 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
startRun your app in production mode with universal rendering.
start:dev:universalRun your app in development mode with universal rendering with server auto restarting when file change.
start:devRun your app in development mode without universal rendering with webpack hot server auto restarting when file change.
buildCompiles the application to the corresponding folder(server/ and server/static) in production mode.
build:devCompiles the application to the corresponding folder(server/ and server/static) in dev mode.
testRuns unit tests with Jest.
lintCheck for lint errors and runs for all .js and .jsx files.
lint:fixCheck and fix for lint errors.

Deployment to Production

TBC

License

This source code is licensed under the MIT license.