Skip to content

Commit abf6553

Browse files
committed
Overhaul example scripts
- all examples depends on the sdk code, contains in the repo. - Use `/callback` as the endpoint in echo-bot-ts. - Update various dependencies
1 parent 63bb28f commit abf6553

File tree

12 files changed

+5107
-6767
lines changed

12 files changed

+5107
-6767
lines changed

examples/echo-bot-ts/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ cd line-bot-sdk-nodejs/examples/echo-bot-ts
2626
- Install all dependencies.
2727

2828
```bash
29+
npm run build-sdk
2930
npm install
3031
```
3132

@@ -40,7 +41,7 @@ export PORT=<YOUR_PORT>
4041
- Setup your webhook URL in your LINE Official Account to be in the following format. Don't forget to disable the greeting messages and auto-response messages for convenience.
4142

4243
```bash
43-
https://example-url.com/webhook
44+
https://example.com/callback
4445
```
4546

4647
- Compile the TypeScript files.

examples/echo-bot-ts/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ app.get(
6060

6161
// This route is used for the Webhook.
6262
app.post(
63-
'/webhook',
63+
'/callback',
6464
middleware(middlewareConfig),
6565
async (req: Request, res: Response): Promise<Response> => {
6666
const events: WebhookEvent[] = req.body.events;
6767

68-
// Process all of the received events asynchronously.
68+
// Process all the received events asynchronously.
6969
const results = await Promise.all(
7070
events.map(async (event: WebhookEvent) => {
7171
try {

0 commit comments

Comments
 (0)