2019-07-27 01:30:19 +09:00
|
|
|
# だらずさん ⚡
|
|
|
|
|
|
|
|
[Slack ⚡ Bolt](https://github.com/SlackAPI/bolt) で作り直した [だらずさん](https://github.com/daraz-tek/daraz-bot)
|
|
|
|
|
|
|
|
## つかいかた
|
|
|
|
|
|
|
|
### Slack アプリの作成
|
|
|
|
|
|
|
|
- Redirect URLs を設定 (例: https://{ホスト名}/ )
|
|
|
|
- Bot Users を設定
|
|
|
|
- (デプロイ後) Event Subscriptions を設定
|
|
|
|
- Request URL を設定 (例: https://{ホスト名}/slack/events )
|
|
|
|
- Bot Events を登録
|
|
|
|
- message.channels (パブリックチャンネルのメッセージをリスニング) など
|
|
|
|
|
|
|
|
### 起動
|
|
|
|
|
|
|
|
次の環境変数を与えてから `yarn && yarn start`
|
|
|
|
|
|
|
|
- `SLACK_BOT_TOKEN` ... OAuth & Permissions ページにあるボット (xoxb) トークン
|
|
|
|
- `SLACK_SIGNING_SECRET` ... Basic Information ページにある Signing Secret
|
2019-07-29 22:18:47 +09:00
|
|
|
- (Optional) `PORT` ... ポート番号。デフォルトは 8080。
|
2019-07-27 01:30:19 +09:00
|
|
|
|
|
|
|
### デプロイ
|
|
|
|
|
2020-05-17 05:27:30 +09:00
|
|
|
#### Fly.io
|
|
|
|
|
|
|
|
[`flyctl deploy`](https://fly.io/docs/speedrun/)
|
|
|
|
|
2019-07-29 22:18:47 +09:00
|
|
|
#### Heroku
|
|
|
|
|
2019-07-27 01:30:19 +09:00
|
|
|
[](https://heroku.com/deploy?template=https://github.com/kou029w/daraz-san)
|
2019-07-29 22:18:47 +09:00
|
|
|
|
2020-05-27 21:36:44 +09:00
|
|
|
#### Google Cloud Run
|
|
|
|
|
|
|
|
[](https://deploy.cloud.run/?git_repo=https://github.com/kou029w/daraz-san)
|
|
|
|
|
2019-07-29 22:18:47 +09:00
|
|
|
#### CodeSandbox
|
|
|
|
|
|
|
|
[](https://codesandbox.io/s/github/kou029w/daraz-san)
|
2020-03-26 15:57:55 +09:00
|
|
|
|
|
|
|
#### Glitch
|
|
|
|
|
|
|
|
[](https://glitch.com/edit/#!/kou029w-daraz-san)
|