Table of Contents
git clone https://github.com/pmlord/legislative-scorecard.git cd legislative-scorecard yarn install
yarn is a drop-in replacement for
npm, and is what you’ll see documented throughout this README. You can install it with
npm install --global yarn
The dev server will run on http://localhost:3000
HTTPS=true yarn start
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 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.
yarn build:staging yarn build:production yarn build # alias for build:production
Hosted on AWS with S3, CloudFront, and Route-53.
Deploy whatever's in the
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