This project was bootstrapped with Create React App.
Want to use GitHub Pages to publish your own copy of this? You've come to the right place!
- Duplicate this repository into your own GitHub repo
- Run
npm install
in your local root directory of the project - In your GitHub repository, go to Settings > Pages and create a GitHub Page. Copy the URL of your GitHub Page, for use in the next section.
- In
src/components/qrCode.js
, modifyQRURL
to be your github pages URL - In
package.json
, modify the "homepage" to point to your github pages URL - In
src/index.js
, modifyCLIENTKEY
to be your own LaunchDarkly client-side SDK key
- You can either use the LaunchDarkly Terraform integration with
main.tf
in the root directory, replacing theaccess_token
andproject_key
values. (Careful, project_key appears twice!) - Alternatively, you can manually create the flags in your project. Flag one needs a key of
reactBackgroundColor
, withgray
,purple
,blue
, andred
as string variations. Flag two is a boolean flag, with a key ofreactQRCode
.
- To test that it's working locally, run
npm start
in the root directory of your project - On your LaunchDarkly dashboard, try turning the
reactQRCode
flag on and off, and serve different colors in thereactBackgroundColor
flag
- When you're ready,
npm run deploy
to deploy to a newgh-pages
branch of your repository - On your GitHub repository, go to Settings > Pages and ensure you're using the
gh-pages
branch in theroot
directory