- Git add and git commit everything on master. If you have branches that are ready, they should be merged into the master branch.
- Push the master branch back to GitHub. The code that is committed and pushed to GitHub is the code that will be launched.
- Your teacher will clone your repo from GitHub.
- Your teacher will run
heroku create name-of-app
and the app will be created. Write down the entire domain of the new app. - If Google Auth is set up, go back to the Google developer's console and add the new domain + '/authenticated' as an Authorized redirect URI.
Download your client_secrets.json file after you updated your account (it changes after you add another redirect URI).
- NOTE: you must hit Save after you add the new URI, and if it doesn't redirect you out of the redirect URI screen when you hit Save, it isn't really saved.
- Push your repo to Heroku.
git push heroku master
Why does this work? Because your teacher added heroku
as a remote repository, just like GitHub is a remote repository. So now that it is created, you can push.
- Set environmental variable for client secrets.
In command line/terminal, type: heroku config:set CLIENT_SECRETS='
and then paste the entire content of your client_secrets.json
file and end your single quote. You must use single quotes around our CLIENT_SECRETS, not double quotes. Do you not add anything else. An example might look like:
$ heroku config:set CLIENT_SECRETS='{"web":{"client_id":"long-id.apps.googleusercontent.com","project_id":"sheql-175101","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://accounts.google.com/o/oauth2/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"some-secret-string","redirect_uris":["https://test-gmfholley.c9users.io/authenticated","http://localhost:4567/authenticated","https://sheql-test.herokuapp.com/authenticated"]}}'
- Your app should be running. You can visit it to make sure.
- Run your database migrations on Heroku by using the same command but with
heroku run
in front of it:heroku run rake db:migrate
. (Heroku should create your database automatically if you have it set up correctly.) - Run the seed files, if you have them:
heroku run rake db:seed
.