Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heroku no longer provide free-plan. We'll remove the Heroku specific #480

Merged
merged 1 commit into from
Sep 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 2 additions & 48 deletions examples/echo-bot-ts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ An example LINE bot to echo message with TypeScript. The bot is coded according

- Git
- Node.js version 10 and up
- Heroku CLI (optional)
- LINE Developers Account for the bot

## Installation
Expand All @@ -29,15 +28,15 @@ cd line-bot-sdk-nodejs/examples/echo-bot-ts
npm install
```

- Configure all of the environment variables.
- Configure all the environment variables.

```bash
export CHANNEL_ACCESS_TOKEN=<YOUR_CHANNEL_ACCESS_TOKEN>
export CHANNEL_SECRET=<YOUR_CHANNEL_SECRET>
export PORT=<YOUR_PORT>
```

- 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.
- 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.

```bash
https://example-url.com/webhook
Expand All @@ -55,48 +54,3 @@ npm run build
npm start
```

## Alternative Installation

If you want to deploy it via Heroku, it is also possible and is even easier for testing purposes.

- Clone the repository.

```bash
git clone https://github.com/line/line-bot-sdk-nodejs.git
```

- Change directory to the example.

```bash
cd line-bot-sdk-nodejs/examples/echo-bot-ts
```

- Create a Heroku application.

```bash
git init
heroku create <YOUR_APP_NAME> # Do not specify for a random name
```

- Setup the environment variables, and don't forget to setup your webhook URL (from the Heroku application that you have just created) in your LINE Offical Account. The webhook URL will still accept the following format: `https://example-url.com.herokuapp.com/webhook`.

```bash
heroku config:set CHANNEL_ACCESS_TOKEN=YOUR_CHANNEL_ACCESS_TOKEN
heroku config:set CHANNEL_SECRET=YOUR_CHANNEL_SECRET
```

- Push the application to the server.

```bash
git add .
git commit -m "Initial commit for Heroku testing"
git push heroku master
```

- Open your application.

```bash
heroku open
```

- Done!