Skip to content

Commit dc93a80

Browse files
authored
Merge pull request #481 from tokuhirom/overhaul-examples
Overhaul example scripts
2 parents e9fdfe2 + abf6553 commit dc93a80

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
@@ -25,6 +25,7 @@ cd line-bot-sdk-nodejs/examples/echo-bot-ts
2525
- Install all dependencies.
2626

2727
```bash
28+
npm run build-sdk
2829
npm install
2930
```
3031

@@ -39,7 +40,7 @@ export PORT=<YOUR_PORT>
3940
- Set up 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.
4041

4142
```bash
42-
https://example-url.com/webhook
43+
https://example.com/callback
4344
```
4445

4546
- 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)