AF Hack Day 2019 - brownfield-team/anacapa-github-linker GitHub Wiki
Some notes from AF Hack Day 2019
- Getting started with React: https://facebook.github.io/create-react-app/docs/getting-started
npx create-react-app users
Put webpacker
in the Gemfile
rails webpacker:install
rails webpacker:install:react
npm run build
Getting GitHub developer credentials
Visit your GitHub profile > Settings > Developer Tools > New GitHub App
- The app name can be whatever your heart desires.
- Homepage URL: http://localhost:3000
- User authorization callback URL: http://localhost:3000/users/auth/github/callback
- User permissions > Emails: set to read-only
- Where can this app be installed? Only on this account for development (Unsure 100%)
Setting up the environment
- At the root directory of the project, make a copy of
.env.example
by running:cp .env.example .env.sh
- Use the credentials provided by GitHub to fill out the OMNI-AUTH variables
- Run
. .env.sh
to export the variables in the terminal you plan on running the backend from, otherwise the server won't know about those credentials.- Note: you'll need to export this for every new terminal window you plan on running the backend from.
bundle install
andbundle exec rails server
to get your now GitHub enabled app up onlocalhost:3000
.- Note: if you have trouble with the
pg
gem, trygem uninstall pg
and immediately reinstalling withgem install pg
.
- Note: if you have trouble with the