Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 019c46c

Browse files
author
Craig Dennis
committed
Updates notes
1 parent 6755db5 commit 019c46c

File tree

2 files changed

+111
-4
lines changed

2 files changed

+111
-4
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1+
[![Learn to code with TwilioQuest](https://img.shields.io/static/v1?label=TwilioQuest&message=Learn%20to%20code%21&color=F22F46&labelColor=1f243c&style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAASFBMVEUAAAAZGRkcHBwjIyMoKCgAAABgYGBoaGiAgICMjIyzs7PJycnMzMzNzc3UoBfd3d3m5ubqrhfrMEDu7u739/f4vSb/3AD///9tbdyEAAAABXRSTlMAAAAAAMJrBrEAAAKoSURBVHgB7ZrRcuI6EESdyxXGYoNFvMD//+l2bSszRgyUYpFAsXOeiJGmj4NkuWx1Qeh+Ekl9DgEXOBwOx+Px5xyQhDykfgq4wG63MxxaR4ddIkg6Ul3g84vCIcjPBA5gmUMeXESrlukuoK33+33uID8TWeLAdOWsKpJYzwVMB7bOzYSGOciyUlXSn0/ABXTosJ1M1SbypZ4O4MbZuIDMU02PMbauhhHMHXbmebmALIiEbbbbbUrpF1gwE9kFfRNAJaP+FQEXCCTGyJ4ngDrjOFo3jEL5JdqjF/pueR4cCeCGgAtwmuRS6gDwaRiGvu+DMFwSBLTE3+jF8JyuV1okPZ+AC4hDFhCHyHQjdjPHUKFDlHSJkHQXMB3KpSwXNGJPcwwTdZiXlRN0gSp0zpWxNtM0beYE0nRH6QIbO7rawwXaBYz0j78gxjokDuv12gVeUuBD0MDi0OQCLvDaAho4juP1Q/jkAncXqIcCfd+7gAu4QLMACCLxpRsSuQh0igu0C9Svhi7weAGZg50L3IE3cai4IfkNZAC8dfdhsUD3CgKBVC9JE5ABAFzg4QL/taYPAAWrHdYcgfLaIgAXWJ7OV38n1LEF8tt2TH29E+QAoDoO5Ve/LtCQDmKM9kPbvCEBApK+IXzbcSJ0cIGF6e8gpcRhUDogWZ8JnaWjPXc/fNnBBUKRngiHgTUSivSzDRDgHZQOLvBQgf8rRt+VdBUUhwkU6VpJ+xcOwQUqZr+mR0kvBUgv6cB4+37hQAkXqE8PwGisGhJtN4xAHMzrsgvI7rccXqSvKh6jltGlrOHA3Xk1At3LC4QiPdX9/0ndHpGVvTjR4bZA1ypAKgVcwE5vx74ulwIugDt8e/X7JgfkucBMIAr26ndnB4UCLnDOqvteQsHlgX9N4A+c4cW3DXSPbwAAAABJRU5ErkJggg==)](https://twilio.com/quest?utm_source=gh-badge&utm_medium=referral&utm_campaign=webhooks-course)
2+
13
# Understanding Webhooks
24

35
This repository contains detailed notes and code for the Understanding Webhooks course 💡
46

57
* [🚀 Code](./code)
68
* [📚 Notes](notes.md)
9+
* [🎮 Learn more for free using a video game](https://twilio.com/quest?utm_source=gh-link&utm_medium=referral&utm_campaign=webhooks-course)
10+
711

812
[@craigsdennis](https://twitter.com/craigsdennis)

notes.md

Lines changed: 107 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![Learn to code with TwilioQuest](https://img.shields.io/static/v1?label=TwilioQuest&message=Learn%20to%20code%21&color=F22F46&labelColor=1f243c&style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAASFBMVEUAAAAZGRkcHBwjIyMoKCgAAABgYGBoaGiAgICMjIyzs7PJycnMzMzNzc3UoBfd3d3m5ubqrhfrMEDu7u739/f4vSb/3AD///9tbdyEAAAABXRSTlMAAAAAAMJrBrEAAAKoSURBVHgB7ZrRcuI6EESdyxXGYoNFvMD//+l2bSszRgyUYpFAsXOeiJGmj4NkuWx1Qeh+Ekl9DgEXOBwOx+Px5xyQhDykfgq4wG63MxxaR4ddIkg6Ul3g84vCIcjPBA5gmUMeXESrlukuoK33+33uID8TWeLAdOWsKpJYzwVMB7bOzYSGOciyUlXSn0/ABXTosJ1M1SbypZ4O4MbZuIDMU02PMbauhhHMHXbmebmALIiEbbbbbUrpF1gwE9kFfRNAJaP+FQEXCCTGyJ4ngDrjOFo3jEL5JdqjF/pueR4cCeCGgAtwmuRS6gDwaRiGvu+DMFwSBLTE3+jF8JyuV1okPZ+AC4hDFhCHyHQjdjPHUKFDlHSJkHQXMB3KpSwXNGJPcwwTdZiXlRN0gSp0zpWxNtM0beYE0nRH6QIbO7rawwXaBYz0j78gxjokDuv12gVeUuBD0MDi0OQCLvDaAho4juP1Q/jkAncXqIcCfd+7gAu4QLMACCLxpRsSuQh0igu0C9Svhi7weAGZg50L3IE3cai4IfkNZAC8dfdhsUD3CgKBVC9JE5ABAFzg4QL/taYPAAWrHdYcgfLaIgAXWJ7OV38n1LEF8tt2TH29E+QAoDoO5Ve/LtCQDmKM9kPbvCEBApK+IXzbcSJ0cIGF6e8gpcRhUDogWZ8JnaWjPXc/fNnBBUKRngiHgTUSivSzDRDgHZQOLvBQgf8rRt+VdBUUhwkU6VpJ+xcOwQUqZr+mR0kvBUgv6cB4+37hQAkXqE8PwGisGhJtN4xAHMzrsgvI7rccXqSvKh6jltGlrOHA3Xk1At3LC4QiPdX9/0ndHpGVvTjR4bZA1ypAKgVcwE5vx74ulwIugDt8e/X7JgfkucBMIAr26ndnB4UCLnDOqvteQsHlgX9N4A+c4cW3DXSPbwAAAABJRU5ErkJggg==)](https://twilio.com/quest?utm_source=gh-badge&utm_medium=referral&utm_campaign=webhooks-course)
2+
13
# Understanding Webhooks
24

35
## Unit 1 - Integration
@@ -8,7 +10,7 @@ In this unit we will focus on combining applications together. We'll do this by
810

911
#### Prerequisites
1012

11-
* 🎥[APIs for Beginners on freeCodeCamp.org](https://www.youtube.com/watch?v=GZvSYJDk-us&feature=youtu.be)
13+
* 🎥[APIs for Beginners on freeCodeCamp](https://www.youtube.com/watch?v=GZvSYJDk-us&feature=youtu.be)
1214

1315
#### 📚 Learn more
1416

@@ -22,7 +24,6 @@ In this unit we will focus on combining applications together. We'll do this by
2224

2325
* [Event Driven Programming](https://wiki.c2.com/?EventDrivenProgramming)
2426

25-
2627
### Video 3 - Lightbulb moment
2728

2829
#### 💡 Ideas
@@ -40,17 +41,40 @@ In this unit we will focus on combining applications together. We'll do this by
4041

4142
## Unit 2 - Capturing Data from a Webhook
4243

44+
In this unit we'll take a look at a specific Webhook implementations [GitHub](https://github.com) and [Discord](https://discord.com).
45+
4346
### Video 1 - Diving into Webhooks
4447

48+
* [First blog post about "Web hooks" - Wayback machine](https://web.archive.org/web/20180630220036/http://progrium.com/blog/2007/05/03/web-hooks-to-revolutionize-the-web/)
49+
4550
### Video 2 - Explore the Request
4651

52+
* [Beeceptor](https://beeceptor.com)
53+
4754
### Video 3 - Using the Data
4855

4956
### Video 4 - Developing Locally
5057

58+
⚠️ I made a mistake! I cloned in my `~/Code` directory because I forgot to `cd courses`.
59+
60+
#### Installations
61+
62+
* [Install Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
63+
* [Install Node](https://nodejs.org/en/download/)
64+
* [Install npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
65+
5166
### Video 5 - Opening a Tunnel
5267

53-
* [ngrok](https://ngrok.com)
68+
#### Installations
69+
70+
* [Install ngrok](https://ngrok.com)
71+
* TODO: Add ngrok to your path
72+
73+
Install [nodemon](https://www.npmjs.com/package/nodemon):
74+
75+
```bash
76+
npm install -g nodemon
77+
```
5478

5579
#### 📚 Learn more
5680

@@ -60,20 +84,99 @@ In this unit we will focus on combining applications together. We'll do this by
6084

6185
* [Netlify](https://www.netlify.com)
6286

87+
```bash
88+
npm install netlify-cli -g
89+
```
90+
91+
#### 📚 Learn more
92+
93+
* [Making asynchronous programming easier with async and await
94+
](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Asynchronous/Async_await)
95+
* [Netlify Dev - Local server](https://www.netlify.com/products/dev/)
96+
6397
#### 🖊 Correction
6498

65-
📓 I figured out what my problem was! After you change environment variables in Netlify you need to reboot. I decided to keep the bugs in there so you know that we all make mistakes, and how to debug a webhook. I hope you enjoy the lemonade made from the lemons of that bit 🍋.
99+
📓 I figured out what my problem was! After you change environment variables in Netlify, you need to reboot. I decided to keep the bugs in there so you know that we all make mistakes, and also how to debug a webhook.
100+
101+
I hope you enjoy the lemonade made from the lemons of that bit 🍋s.
66102

67103
### Unit 3 - Hooking it altogether
68104

105+
In this unit we'll build an entire application that leans almost entirely on the concept of Webhooks. We'll build an idea capturing hotline that transcribes the ideas and then sends you a text message.
106+
69107
### Video 1 - Introducing the projects
70108

71109
### Video 2 - Text Affirmation
72110

111+
* [Twilio Signup](https://www.twilio.com/referral/d4X15O)
112+
* [How to use your free trial account - Twilio Docs](https://www.twilio.com/docs/usage/tutorials/how-to-use-your-free-trial-account)
113+
114+
The following [TwiML](https://twilio.com/docs/sms/twiml) will send a text message when set up to handle incoming messages.
115+
116+
```xml
117+
<Response>
118+
<Message>You got this!💪</Message>
119+
</Response>
120+
```
121+
122+
This is using a Webhook. When the message comes in, control is passed to your application (it just happens to be in a TwiML Bin), and you return these instructions.
123+
124+
#### 📚 Learn more
125+
126+
* [<Message> - Twilio Docs](https://www.twilio.com/docs/sms/twiml/message)
127+
* [TwiML Bins](https://www.twilio.com/docs/runtime/tutorials/twiml-bins)
128+
129+
TODO: Scaling
130+
131+
73132
### Video 3 - Setting up the flow
74133

134+
#### 📚 Learn more
135+
136+
* [<Say> - Twilio docs](https://www.twilio.com/docs/voice/twiml/say)
137+
* [Polly Neural voices - Amazon docs](https://docs.aws.amazon.com/polly/latest/dg/NTTS-main.html)
138+
* [Twilio Studio](https://twilio.com/studio)
139+
75140
### Video 4 - Handle things locally
76141

142+
* [Twilio CLI Quickstart](https://www.twilio.com/docs/twilio-cli/quickstart)
143+
144+
```bash
145+
npm install twilio-cli -g
146+
```
147+
148+
Optionally on a Mac, you could use [Homebrew](https://brew.sh)
149+
150+
```bash
151+
brew tap twilio/brew && brew install twilio
152+
```
153+
154+
Install the [Serverless Toolkit](https://www.twilio.com/docs/labs/serverless-toolkit) plugin:
155+
156+
```bash
157+
twilio plugins:install @twilio-labs/plugin-serverless
158+
```
159+
160+
Serverless Function boilerplate:
161+
162+
```javascript
163+
exports.handler = (context, event, callback) => {
164+
callback(null, "Hi mom!");
165+
};
166+
```
167+
168+
Start your local development server
169+
170+
```bash
171+
twilio serverless:start
172+
```
173+
77174
### Video 5 - Deploying your serverless function
78175

176+
```bash
177+
twilio serverless:deploy
178+
```
179+
79180
### Video 6 - That’s a Wrap
181+
182+
* 🎮[TwilioQuest - Learn to code and save the cloud]()

0 commit comments

Comments
 (0)