From 2af014b4886243ee4bb46429150256bbf70a466f Mon Sep 17 00:00:00 2001 From: "Xiaofu.Huang" Date: Tue, 11 Jul 2023 11:17:24 +0800 Subject: [PATCH] docs: use dev tunnel cli instead of ngrok --- NPM-search-connector-M365/cli.md | 15 +++++++++------ bot-sso/README.md | 16 ++++++++-------- command-bot-with-sso/README.md | 12 ++++++------ hello-world-bot-with-tab/README.md | 10 ++++++---- 4 files changed, 29 insertions(+), 24 deletions(-) diff --git a/NPM-search-connector-M365/cli.md b/NPM-search-connector-M365/cli.md index 8fc27110..057a33a9 100644 --- a/NPM-search-connector-M365/cli.md +++ b/NPM-search-connector-M365/cli.md @@ -7,12 +7,15 @@ ``` teamsfx new template npm-search-connector-m365 ``` -1. For local env, install [ngrok](https://ngrok.com/download) and start your local tunnel service by running the command `ngrok http 3978`. -1. For local env, fill in the values for `BOT_DOMAIN` and `BOT_ENDPOINT` with your ngrok URL in the `env/.env.local` file. - ``` - BOT_DOMAIN=sample-id.ngrok.io - BOT_ENDPOINT=https://sample-id.ngrok.io - ``` +1. For local env, start your local tunnel service. + 1. Install [dev tunnel cli](https://aka.ms/teamsfx-install-dev-tunnel). + 1. Login with your M365 Account using the command `devtunnel user login`. + 1. Start your local tunnel service by running the command `devtunnel host -p 3978 --protocol http --allow-anonymous`. + 1. In the `env/.env.local` file, fill in the values for `BOT_DOMAIN` and `BOT_ENDPOINT` with your dev tunnel URL. + ``` + BOT_DOMAIN=sample-id-3978.devtunnels.ms + BOT_ENDPOINT=https://sample-id-3978.devtunnels.ms + ``` 1. Provision. ``` teamsfx provision --env diff --git a/bot-sso/README.md b/bot-sso/README.md index 19554a1d..0fb2fec3 100644 --- a/bot-sso/README.md +++ b/bot-sso/README.md @@ -22,14 +22,14 @@ This is a sample chatbot application demonstrating Single Sign-on using `botbuil - From VS Code: 1. hit `F5` to start debugging. Alternatively open the `Run and Debug Activity` Panel and select `Debug (Edge)` or `Debug (Chrome)`. - From TeamsFx CLI: - 1. Install [ngrok](https://ngrok.com/download). - 1. Sign up an ngrok account in https://dashboard.ngrok.com/signup. Copy your personal ngrok authtoken from https://dashboard.ngrok.com/get-started/your-authtoken. - 1. Start your local tunnel service by running the command `ngrok http 3978 --authtoken=`. - 1. In the `env/.env.local` file, fill in the values for `BOT_DOMAIN` and `BOT_ENDPOINT` with your ngrok URL. - ``` - BOT_DOMAIN=sample-id.ngrok.io - BOT_ENDPOINT=https://sample-id.ngrok.io - ``` + 1. Install [dev tunnel cli](https://aka.ms/teamsfx-install-dev-tunnel). + 1. Login with your M365 Account using the command `devtunnel user login`. + 1. Start your local tunnel service by running the command `devtunnel host -p 3978 --protocol http --allow-anonymous`. + 1. In the `env/.env.local` file, fill in the values for `BOT_DOMAIN` and `BOT_ENDPOINT` with your dev tunnel URL. + ``` + BOT_DOMAIN=sample-id-3978.devtunnels.ms + BOT_ENDPOINT=https://sample-id-3978.devtunnels.ms + ``` 1. Run command: `teamsfx provision --env local` . 1. Run command: `teamsfx deploy --env local` . 1. Run command: `teamsfx preview --env local` . diff --git a/command-bot-with-sso/README.md b/command-bot-with-sso/README.md index 5a3c79ba..b85cad19 100644 --- a/command-bot-with-sso/README.md +++ b/command-bot-with-sso/README.md @@ -36,13 +36,13 @@ This is a simple command bot that implements single sign-on feature to retrieve 1. Press "F5" to open a browser window and then select your package to view contact exporter sample app. - From TeamsFx CLI - 1. Install [ngrok](https://ngrok.com/download). - 1. Sign up an ngrok account in https://dashboard.ngrok.com/signup. Copy your personal ngrok authtoken from https://dashboard.ngrok.com/get-started/your-authtoken. - 1. Start your local tunnel service by running the command `ngrok http 3978 --authtoken=`. - 1. In the `env/.env.local` file, fill in the values for `BOT_DOMAIN` and `BOT_ENDPOINT` with your ngrok URL. + 1. Install [dev tunnel cli](https://aka.ms/teamsfx-install-dev-tunnel). + 1. Login with your M365 Account using the command `devtunnel user login`. + 1. Start your local tunnel service by running the command `devtunnel host -p 3978 --protocol http --allow-anonymous`. + 1. In the `env/.env.local` file, fill in the values for `BOT_DOMAIN` and `BOT_ENDPOINT` with your dev tunnel URL. ``` - BOT_DOMAIN=sample-id.ngrok.io - BOT_ENDPOINT=https://sample-id.ngrok.io + BOT_DOMAIN=sample-id-3978.devtunnels.ms + BOT_ENDPOINT=https://sample-id-3978.devtunnels.ms ``` 1. Run command: `teamsfx provision --env local` . 1. Run command: `teamsfx deploy --env local` . diff --git a/hello-world-bot-with-tab/README.md b/hello-world-bot-with-tab/README.md index ee679863..37798d43 100644 --- a/hello-world-bot-with-tab/README.md +++ b/hello-world-bot-with-tab/README.md @@ -22,11 +22,13 @@ This is a simple "Hello World" application that has both Bot and Tab capabilitie 1. hit `F5` to start debugging. Alternatively open the `Run and Debug Activity` Panel and select `Debug (Edge)` or `Debug (Chrome)`. - From TeamsFx CLI: - 1. Install [ngrok](https://ngrok.com/download) and start your local tunnel service by running the command `ngrok http 3978`. - 1. In the `env/.env.local` file, fill in the values for `BOT_DOMAIN` and `BOT_ENDPOINT` with your ngrok URL. + 1. Install [dev tunnel cli](https://aka.ms/teamsfx-install-dev-tunnel). + 1. Login with your M365 Account using the command `devtunnel user login`. + 1. Start your local tunnel service by running the command `devtunnel host -p 3978 --protocol http --allow-anonymous`. + 1. In the `env/.env.local` file, fill in the values for `BOT_DOMAIN` and `BOT_ENDPOINT` with your dev tunnel URL. ``` - BOT_DOMAIN=sample-id.ngrok.io - BOT_ENDPOINT=https://sample-id.ngrok.io + BOT_DOMAIN=sample-id-3978.devtunnels.ms + BOT_ENDPOINT=https://sample-id-3978.devtunnels.ms ``` 1. Run command: `teamsfx provision --env local` . 1. Run command: `teamsfx deploy --env local` .