|
12 | 12 |
|
13 | 13 | This application should give you a ready-made starting point for writing your own voice apps with Twilio Voice JavaScript SDK 2.0 (Formerly known as Twilio Client).
|
14 | 14 |
|
15 |
| - |
16 |
| -> **NOTE** The Twilio JS SDK library is included in this repo as [`twilio.min.js`](./public/twilio.min.js) using the build artifact from the [2.0.0 tag](https://github.com/twilio/twilio-voice.js/releases/tag/2.0.0). The 2.0.1 version is expected to be publicly available on npm before 7/11/2021. This project will be updated to use `npm install @twilio/twilio-voice` at that time. |
17 |
| -
|
18 |
| - |
19 | 15 | This application is built in Node.
|
20 | 16 |
|
21 | 17 | Implementations in other languages:
|
@@ -78,24 +74,31 @@ Before we begin local development, we need to collect all the config values we n
|
78 | 74 | npm install
|
79 | 75 | ```
|
80 | 76 |
|
81 |
| -4. Launch local development web server. |
| 77 | +4. Copy the `twilio.min.js` file from your `node_modules` to your `public` directory. Run the following from the root directory of your project: |
| 78 | + |
| 79 | + ```bash |
| 80 | + cp node_modules/@twilio/voice-sdk/dist/twilio.min.js public |
| 81 | + ``` |
| 82 | + **Note:** In order to keep this quickstart as simple as possible, this step is used to avoid any need for build tools like Webpack. |
| 83 | + |
| 84 | +5. Launch local development web server. |
82 | 85 |
|
83 | 86 | ```bash
|
84 | 87 | npm start
|
85 | 88 | ```
|
86 | 89 |
|
87 |
| -5. Navigate to [http://localhost:3000](http://localhost:3000) in your browser. |
| 90 | +6. Navigate to [http://localhost:3000](http://localhost:3000) in your browser. |
88 | 91 |
|
89 |
| -6. Expose your application to the wider internet using `ngrok`. This step is **crucial** for the app to work as expected. |
| 92 | +7. Expose your application to the wider internet using `ngrok`. This step is **crucial** for the app to work as expected. |
90 | 93 |
|
91 | 94 | ```bash
|
92 | 95 | ngrok http 3000
|
93 | 96 | ```
|
94 | 97 |
|
95 |
| -7. `ngrok` will assign a unique URL to your tunnel. |
| 98 | +8. `ngrok` will assign a unique URL to your tunnel. |
96 | 99 | It might be something like `https://asdf456.ngrok.io`. You will need this to configure your TwiML app in the next step.
|
97 | 100 |
|
98 |
| -8. Configure your TwiML app |
| 101 | +9. Configure your TwiML app |
99 | 102 |
|
100 | 103 | - In the Twilio Console, navigate to [Programmable Voice > TwiML > TwiML Apps](https://www.twilio.com/console/voice/twiml/apps)
|
101 | 104 | - Select the TwiML App you created earlier
|
|
0 commit comments