Skip to content

Commit a9ddb48

Browse files
authored
Merge pull request #1678 from vulongphan/fix/installation-guide-update
Update installation doc regarding Github API configuration
2 parents 9b18040 + d0325d9 commit a9ddb48

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

developer_docs/installation.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ _Note_: The installation steps assume you are using a Unix-like shell. If you ar
2626
* For Windows and Linux: [MongoDB Installation](https://docs.mongodb.com/manual/installation/)
2727
7. `$ cp .env.example .env`
2828
8. (Optional) Update `.env` with necessary keys to enable certain app behaviors, i.e. add Github ID and Github Secret if you want to be able to log in with Github.
29-
9. `$ npm run fetch-examples` - this downloads the example sketches into a user called 'p5'
29+
9. Run `$ npm run fetch-examples` to download the example sketches into a user called 'p5'. Note that you need to configure your GitHub Credentials, which you can do by following the [Github API Configuration](#github-api-configuration) section.
30+
3031
10. `$ npm start`
3132
11. Navigate to [http://localhost:8000](http://localhost:8000) in your browser
3233
12. Install the [React Developer Tools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en)
@@ -47,7 +48,8 @@ Note that this takes up a significant amount of space on your machine. Make sure
4748
3. `$ docker-compose -f docker-compose-development.yml build`
4849
4. `$ cp .env.example .env`
4950
5. (Optional) Update `.env` with necessary keys to enable certain app behavoirs, i.e. add Github ID and Github Secret if you want to be able to log in with Github.
50-
6. `$ docker-compose -f docker-compose-development.yml run --rm app npm run fetch-examples`
51+
6. `$ docker-compose -f docker-compose-development.yml run --rm app npm run fetch-examples` - note that you need to configure your GitHub Credentials, which you can do by following the [Github API Configuration](#github-api-configuration) section.
52+
5153

5254
Now, anytime you wish to start the server with its dependencies, you can run:
5355

@@ -80,3 +82,19 @@ name, you can also set it using this variable. I.e.:
8082
For more information on using a custom domain, see this documentation link:
8183

8284
http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html#VirtualHostingCustomURLs
85+
86+
## GitHub API Configuration
87+
88+
In this application, GitHub credentials are used for:
89+
* Authentication with GitHub
90+
* Importing the p5.js examples to your local database
91+
* Rendering the 404 pages
92+
93+
If you are working on a part of the application that requires one of the above uses, then you will need to get GitHub API credentials.
94+
95+
When you go to the Developer settings in your GitHub account, you will see that you can create two types of Apps: `GitHub Apps` and `OAuth Apps` ([differences between GitHub Apps and OAuth Apps](https://docs.github.com/en/free-pro-team@latest/developers/apps/differences-between-github-apps-and-oauth-apps)). This project requires you to make an `OAuth App`. After clicking on "New OAuth App", you will need to fill in the following fields:
96+
- **Application name**: `p5.js Web Editor - Local`
97+
- **Homepage URL**: `http://localhost:8000`
98+
- **Authorization Callback URL**: `http://localhost:8000/auth/github/callback`
99+
100+
If you would like to learn more about what you can do with the GitHub API, you can look at the [API documentation](https://developer.github.com/v3/).

0 commit comments

Comments
 (0)