Skip to content

Latest commit

 

History

History
76 lines (56 loc) · 2.39 KB

README.md

File metadata and controls

76 lines (56 loc) · 2.39 KB

This project was bootstrapped with Create React App. See the bootstrapped README for more info.

Table of Contents

Installation

git clone https://github.com/pmlord/legislative-scorecard.git
cd legislative-scorecard
yarn install

A note on Yarn

yarn is a drop-in replacement for npm, and is what you’ll see documented throughout this README. You can install it with npm

npm install --global yarn

or see their documentation for alternatives such as Homebrew and MacPorts.

Develop

yarn start

The dev server will run on http://localhost:3000

HTTPS

HTTPS=true yarn start

Environments

Within the source code, you can refer to process.env.REACT_APP_ENV for the current environment. The value may be 'development', 'staging', and 'production'. These are set with yarn start, yarn build:staging, and yarn build:production, respectively.

This is an extension of create-react-app's NODE_ENV. process.env.NODE_ENV is still available, but process.env.REACT_APP_ENV should be used instead.

Build

yarn build:staging
yarn build:production
yarn build  # alias for build:production

Deploy

Hosted on AWS with S3, CloudFront, and Route-53.

To deploy, you'll need to install the AWS-CLI and have the appropriate AWS credentials configured.

Deploy whatever's in the /build/ directory:

yarn deploy:staging     # http://
yarn deploy:production  # http://
yarn deploy             # alias for deploy:production

Build & deploy:

yarn build:deploy:staging     # http
yarn build:deploy:production  # http

Credits

The project is a fork of the Legislative Scorecard project created by Peter Lord with design from Shannon McHarg of Efficient Interaction.