Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
@slack/bolt on Cloud Functions for Firebase
Search
Roadagain
July 26, 2019
Programming
1.1k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
@slack/bolt on Cloud Functions for Firebase
gotanda.js #12 LT登壇スライド
Roadagain
July 26, 2019
More Decks by Roadagain
See All by Roadagain
StorybookでモジュールモードのVuex storeを利用する / Use Modules mode Vuex store in Storybook
roadagain
0
1.2k
HL-Report コントラクト開発裏話 / Developing Contracts of HL-Report
roadagain
1
740
Rustでオブジェクト指向エクササイズやってみた / OOP exercise in Rust
roadagain
0
470
RegExp the lifehack
roadagain
0
130
Other Decks in Programming
See All in Programming
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.5k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
120
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
4
3.6k
新人はどこまで自力でやり、どこからAIに頼るべきか/エンジニア育成に向き合う_先輩たちの悩みと知見共有会
toppan_digital_dev
1
580
コンパウンドプロダクト開発のためのローカルプロセスマネージャー再発明 #layerxgo
izumin5210
0
660
スマート反転とウェブアクセシビリティ
camiha
0
170
Deep dive into the select statement (GopherCon UK)
jespino
0
170
信頼性の目標を誰も求めてない
shubox
0
500
Can LLMs Replicate 4 Years of Compose Migration? Exploring the boundaries of automation with 279 XML files from a real product
makun
0
130
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
350
Hello, Hiroshima Geospatial Data! — Exploring DoboX with Python
ra0kley
0
180
PHPプロジェクトの結合バランスを可視化する #php_night
kajitack
0
230
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
230
Color Theory Basics | Prateek | Gurzu
gurzu
0
460
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
エンジニアに許された特別な時間の終わり
watany
108
250k
Mobile First: as difficult as doing things right
swwweet
225
10k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
730
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
490
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.2k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Transcript
@slack/bolt on Cloud Functions for Firebase Roadagain
自己紹介 export default { name: ‘Roadagain’, twitter: ‘@ringoh72’, age: 21,
company: ‘Mobile Factory, Inc.’, organization: “Kosen 13s’”, }
はじめに
seratchさんがいらっしゃると聞いて ビビり散らしてます
ここから本編
@slack/boltとは slack botを開発するためのフレームワーク より簡単にbotが作れる 使った感じwebhookよりは楽だったけど、 他はやったことがないので比較対象がない…
Cloud Functions for Firebaseとは 公式ドキュメントによると Firebase機能やHTTPSリクエストによってトリガーされた イベントに応じて、バックエンドコードを自動的に実行できます。 つまりFirebaseのLambda https://firebase.google.com/docs/functions
Kosen 13s’ slackでの出来事
「bolt使ってみようぜ」
「bolt使ってみようぜ」 Iruyan-Zak「どこで動かそうか」 Roadagain「Firebaseがいい!」 Iruyan-Zak「じゃあそれでいこう」
「bolt使ってみようぜ」 Roadagain「とりあえずサンプルコードは写した」 Roadagain「繋ぎ込み…どうやるの…?」
requestとresponseを受け取ってcallback的にresponseを返す express的なやり方 Cloud Functions for Firebaseの書き方
eventを受け取ってなんやかやする requestやらresponseやらはラップされているっぽい @slack/boltの書き方
繋ぎ込み分からない Roadagain「分からない…ググろう」
bolt firebase cloud functions
bolt firebase cloud functions ヒットするのはfirebase-bolt Realtime Database用のセキュリティルールコンパイラ 今はもう開発止まってるっぽい? なんにせよ紛らわしい
今はそうでもないみたい
slack bolt firebase cloud functions
slack bolt firebase cloud functions boltじゃなくてbotでヒットしてる
「bolt使ってみようぜ」 Roadagain「もうだめだぁ…おしまいだぁ…」
Iruyan-Zakがissueを見つけてくる
Iruyan-Zakがissueを見つけてくる
Iruyan-Zakがissueを見つけてくる seratch/bolt-on-cloud-functions-for-firebase
ExpressReceiverでいけるらしい https://github.com/seratch/bolt-on-cloud-functions-for-firebase/blob/master/functions/index.js ・ ・ ・
ExpressReceiverでいけるらしい https://github.com/seratch/bolt-on-cloud-functions-for-firebase/blob/master/functions/index.js ・ ・ ・
ExpressReceiverでいけるらしい ExpressReceiver.appはexpressのインスタンス →つまりcloud functionsと形式が合う! https://github.com/slackapi/bolt/blob/master/src/ExpressReceiver.ts#L40 ・ ・ ・
早速パクる
早速パクる
各種トークン・シークレットの埋め込み firebase functions:config:set を利用して埋め込む https://firebase.google.com/docs/functions/config-env
各種トークン・シークレットの埋め込み 埋め込まれたconfigは firebase functions:config:get で取得可能 https://firebase.google.com/docs/functions/config-env
各種トークン・シークレットの埋め込み functionsのコードでは functions.config() を使って参照 https://firebase.google.com/docs/functions/config-env
None
// ここでデモする
まとめ • boltは楽にbotが作れる • ExpressReceiverを使えばCloud Functions for Firebaseでも動く • Cloud
Functionsからbolt⚡が届く
Special Thanks Kosen 13s’のslackを実験場に提供してくれたいるやん (@Iruyan_ZAK) firebaseでのサンプルを作ってくださっていたseratchさん (@seratch_ja) ありがとうございました
おまけ @slack/boltのlint通ってなかったのでissueを立てました プルリクチャンス