Skip to content

Commit

Permalink
fix: removes top level await (#4)
Browse files Browse the repository at this point in the history
* removes top level await

* clarify readme
  • Loading branch information
bdougie committed Mar 1, 2022
1 parent ac7bbf8 commit e5df589
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
11 changes: 10 additions & 1 deletion README.md
Expand Up @@ -85,6 +85,14 @@ Copy the "Routes" URL provided by the worker for the next part.

Upon creation you should have plain-text values for `APP_ID`, `CLIENT_ID`.

Add the following secrets to your Cloudflare worker like so:

```
wrangler secret put APP_ID
```

Add the remaingin variables using the same CLI command

Click the "Generate a new client secret" button and copy the value of `CLIENT_SECRET`.

In the webhook return URL copy the value of your worker route as described in the last step of the Cloudflare setup.
Expand All @@ -104,7 +112,8 @@ Rename this file to `private-key.pem` for the next command to work:
openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in private-key.pem -out private-key-pkcs8.key
```

Copy the contents of `private-key-pkcs8.key` to `APP_PK`.
Copy the contents of `private-key-pkcs8.key` to `APP_PK`. Note the
string will need to be on one line joined with `\n`.

### Discord

Expand Down
2 changes: 1 addition & 1 deletion src/index.js
@@ -1,7 +1,7 @@
import { setup, webhooks, verifySignature } from './octokit';

const application = setup();
await webhooks(application);
webhooks(application);

const dashboard = async (app) => {
const { data } = await app.octokit.request('GET /app');
Expand Down
1 change: 1 addition & 0 deletions wrangler.toml
@@ -1,4 +1,5 @@
name = "catsup-app"
account_id = "21fa9e6344b2449e9841137aba186b55"
compatibility_date = "2022-02-19"
workers_dev = true

Expand Down

0 comments on commit e5df589

Please sign in to comment.