You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.[Update your bot's code](#1-update-your-bots-code)
13
-
1. Run ngrok `./ngrok http 3979 --host-header=localhost`
14
-
1. Open your bot in the [Azure Portal](https://ms.portal.azure.com/), select the `Settings` blade and paste the ngrok url provided in the terminal into the *Messaging Endpoint* field then save. **note:** If necessary, don't forget to add the `/api/messages` endpoint.
15
-
1. Set the appropriate environment variables (prefix with EXPORT for OSX/Linux, SET for Windows):
13
+
1. Run DevTunnels `devtunnel host -a -p 3979`
14
+
1. Open your bot in the [Azure Portal](https://portal.azure.com/), select the `Settings` blade and paste the devtunnel url provided in the terminal into the *Messaging Endpoint* field then save. **note:** If necessary, don't forget to add the `/api/messages` endpoint.
15
+
1. Set the appropriate environment variables (prefix with `EXPORT` for OSX/Linux or `SET` for Windows):
16
16
17
17
```bash
18
18
NODE_ENV=development;
@@ -32,10 +32,10 @@ If you have configured your bot to [run in 1 or more channels](https://docs.micr
32
32
**Note:** Since chat messages, Adaptive Cards, and other features have notable differences across the many available channels, the Emulator cannot visually recreate all experiences at this time. Instead, the Emulator provides the inspection of [channel-specific](https://blog.botframework.com/2017/03/28/Custom-Channel-Data/) protocol data and [internal bot state](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-concept-state?view=azure-bot-service-4.0) as each turn context executes throughout the conversation within a channel.
33
33
34
34
## How it works
35
-
The tunneling software [ngrok](https://ngrok.com/) is used to create a tunnel to your locally running bot. The tunnel's URL is provided to your Web App bot in Azure. You build your bot with the BotBuilder **4.4** [InspectionMiddleware](https://github.com/Microsoft/botbuilder-js/blob/1c790f4a4f0d761c215eb3841ff370f4b274f5d1/libraries/testbot/index.js#L21), and run it locally, chatting with it in Teams or another configured channel. The Emulator will receive the conversation's message exchange as usual, and some internal bot state information now being exposed through this middleware.
35
+
The tunneling software is used to create a tunnel to your locally running bot. The tunnel's URL is provided to your Web App bot in Azure. You build your bot with the BotBuilder **4.4** [InspectionMiddleware](https://github.com/Microsoft/botbuilder-js/blob/1c790f4a4f0d761c215eb3841ff370f4b274f5d1/libraries/testbot/index.js#L21), and run it locally, chatting with it in Teams or another configured channel. The Emulator will receive the conversation's message exchange as usual, and some internal bot state information now being exposed through this middleware.
36
36
37
37
## Let's get Started
38
-
If you haven't already, get the [latest Emulator](https://github.com/Microsoft/BotFramework-Emulator/releases), [ngrok](https://ngrok.com/) and update your bot's dependencies to use BotBuilder v4.4+
38
+
If you haven't already, get the [latest Emulator](https://github.com/Microsoft/BotFramework-Emulator/releases), [Dev Tunnels](https://aka.ms/devtunnels) and update your bot's dependencies to use BotBuilder v4.4+
39
39
40
40
### 1. Update Your Bot's Code
41
41
Your bot will need to configure the Bot Inspector middleware in order to connect to and send the conversation exchange to the Emulator. Include the [InspectionMiddleware](https://github.com/Microsoft/botbuilder-js/blob/1c790f4a4f0d761c215eb3841ff370f4b274f5d1/libraries/testbot/index.js#L21) in your Bot's middleware stack:
@@ -59,22 +59,19 @@ if (process.env.MicrosoftAppId && process.env.MicrosoftAppPassword) {
Open a terminal instance and run ngrok with the following command to create a new tunnel (you may need to navigate to where the ngrok executable lives on your filesystem) the port specified is the same port your bot is running on:
62
+
### 2. Run Dev Tunnels
63
+
Open a terminal instance and run Dev Tunnels with the following command to create a new tunnel the port specified is the same port your bot is running on:
64
+
64
65
65
-
OSX
66
-
```bash
67
-
./ngrok http 3978 --host-header=localhost
68
-
```
69
-
Windows
70
66
```bash
71
-
"ngrok.exe" http 3978 --host-header=localhost
67
+
devtunnel host -a -p 3978
72
68
```
73
69
74
-
Save the https entry generated by ngrok to your clipboard.
70
+
71
+
Save the https entry generated by DevTunnels to your clipboard.
75
72
76
73
### 3. Update Azure to Point to the Tunnel
77
-
In the azure portal, [navigate to your bot's settings](https://docs.microsoft.com/en-us/azure/bot-service/bot-service-manage-settings?view=azure-bot-service-4.0) and paste the url provided by the ngrok terminal in the *Messaging endpoint* field and save the changes. Do not forget to use `/api/messages`. It's best to create a Bot in Azure that is used specifically for this purpose. Do not overwrite the messaging endpoint of a deployed production bot.
74
+
In the azure portal, [navigate to your bot's settings](https://docs.microsoft.com/en-us/azure/bot-service/bot-service-manage-settings?view=azure-bot-service-4.0) and paste the url provided by the devtunnel terminal in the *Messaging endpoint* field and save the changes. Do not forget to use `/api/messages`. It's best to create a Bot in Azure that is used specifically for this purpose. Do not overwrite the messaging endpoint of a deployed production bot.
78
75
79
76
### 4. Set the appropriate environment variables in your Bot's running process & start the Bot
0 commit comments