From 2f545e56ad9a13fcf5066680a2260ae60ebe0cd5 Mon Sep 17 00:00:00 2001 From: Yiqing Zhao Date: Mon, 4 Nov 2024 11:22:40 +0800 Subject: [PATCH] docs: update comments and readme (#12643) * docs: update comments and readme * docs: update sdk comments --------- Co-authored-by: Yiqing Zhao --- .../src/conversationWithCloudAdapter/conversation.ts | 12 +++++++----- templates/js/non-sso-tab/README.md | 2 +- templates/ts/non-sso-tab/README.md | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/sdk/src/conversationWithCloudAdapter/conversation.ts b/packages/sdk/src/conversationWithCloudAdapter/conversation.ts index c492690496..58e3e35162 100644 --- a/packages/sdk/src/conversationWithCloudAdapter/conversation.ts +++ b/packages/sdk/src/conversationWithCloudAdapter/conversation.ts @@ -185,15 +185,17 @@ export class ConversationBot { * @param logic - The additional function to handle bot context. * * @example - * For example, to use with Restify: + * For example, to use with Express: * ``` typescript * // The default/empty behavior - * server.use(restify.plugins.bodyParser()); - * server.post("api/messages", conversationBot.requestHandler); + * const expressApp = express(); + * expressApp.use(express.json()); + * expressApp.post("/api/notification", conversationBot.requestHandler); * * // Or, add your own logic - * server.use(restify.plugins.bodyParser()); - * server.post("api/messages", async (req, res) => { + * const expressApp = express(); + * expressApp.use(express.json()); + * expressApp.post("/api/notification", async (req, res) => { * await conversationBot.requestHandler(req, res, async (context) => { * // your-own-context-logic * }); diff --git a/templates/js/non-sso-tab/README.md b/templates/js/non-sso-tab/README.md index 4dc09ecbf2..4537c2a600 100644 --- a/templates/js/non-sso-tab/README.md +++ b/templates/js/non-sso-tab/README.md @@ -40,7 +40,7 @@ The following files can be customized and demonstrate an example implementation | `src/static/scripts/teamsapp.js` | A script that calls `teamsjs` SDK to get the context of on which Microsoft 365 application your app is running. | | `src/static/styles/custom.css` | css file for the app. | | `src/static/views/hello.html` | html file for the app. | -| `src/app.js` | Starting a restify server. | +| `src/app.js` | Starting an `express` server. | The following are Teams Toolkit specific project files. You can [visit a complete guide on Github](https://github.com/OfficeDev/TeamsFx/wiki/Teams-Toolkit-Visual-Studio-Code-v5-Guide#overview) to understand how Teams Toolkit works. diff --git a/templates/ts/non-sso-tab/README.md b/templates/ts/non-sso-tab/README.md index 482a88f83d..db1e1728d7 100644 --- a/templates/ts/non-sso-tab/README.md +++ b/templates/ts/non-sso-tab/README.md @@ -40,7 +40,7 @@ The following files can be customized and demonstrate an example implementation | `src/static/scripts/teamsapp.js` | A script that calls `teamsjs` SDK to get the context of on which Microsoft 365 application your app is running. | | `src/static/styles/custom.css` | css file for the app. | | `src/static/views/hello.html` | html file for the app. | -| `src/app.ts` | Starting a restify server. | +| `src/app.ts` | Starting an `express` server. | The following are Teams Toolkit specific project files. You can [visit a complete guide on Github](https://github.com/OfficeDev/TeamsFx/wiki/Teams-Toolkit-Visual-Studio-Code-v5-Guide#overview) to understand how Teams Toolkit works.