@microsoft/teamsfx 3.0.0-alpha.dc2ed64c9.0 → 3.0.0-alpha.decc8f69b.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -648,7 +648,24 @@ From `botbuilder@4.16.0`, `BotFrameworkAdapter` is deprecated, and `CloudAdapter
648
648
  });
649
649
  ```
650
650
 
651
- 4. If the project has `responseWrapper.ts`, please update the class `responseWrapper` to the class below.
651
+ 4. If the project is using `express` to create a server, please add the following line after `express()`.
652
+
653
+ ```ts
654
+ expressApp.use(express.json());
655
+ ```
656
+
657
+ The complete code will be like
658
+
659
+ ```ts
660
+ // Create HTTP server.
661
+ const expressApp = express();
662
+ expressApp.use(express.json());
663
+ const server = expressApp.listen(process.env.port || process.env.PORT || 3978, () => {
664
+ console.log(`\nBot Started, ${expressApp.name} listening to`, server.address());
665
+ });
666
+ ```
667
+
668
+ 5. If the project has `responseWrapper.ts`, please update the class `responseWrapper` to the class below.
652
669
 
653
670
  ```ts
654
671
  import { Response } from "botbuilder";
@@ -3533,15 +3533,17 @@ class ConversationBot {
3533
3533
  * @param logic - The additional function to handle bot context.
3534
3534
  *
3535
3535
  * @example
3536
- * For example, to use with Restify:
3536
+ * For example, to use with Express:
3537
3537
  * ``` typescript
3538
3538
  * // The default/empty behavior
3539
- * server.use(restify.plugins.bodyParser());
3540
- * server.post("api/messages", conversationBot.requestHandler);
3539
+ * const expressApp = express();
3540
+ * expressApp.use(express.json());
3541
+ * expressApp.post("/api/notification", conversationBot.requestHandler);
3541
3542
  *
3542
3543
  * // Or, add your own logic
3543
- * server.use(restify.plugins.bodyParser());
3544
- * server.post("api/messages", async (req, res) => {
3544
+ * const expressApp = express();
3545
+ * expressApp.use(express.json());
3546
+ * expressApp.post("/api/notification", async (req, res) => {
3545
3547
  * await conversationBot.requestHandler(req, res, async (context) => {
3546
3548
  * // your-own-context-logic
3547
3549
  * });