Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Google I/O 2024で発表された Firebase App HostingでNext.jsのSSRを試す
Search
Kanon
June 02, 2024
2
150
Google I/O 2024で発表された Firebase App HostingでNext.jsのSSRを試す
Google I/O Extended 2024でのLT発表資料です。
Kanon
June 02, 2024
Tweet
Share
More Decks by Kanon
See All by Kanon
WebサーバーとPHP実行方式を きちんと理解してPHPランタイムを 適切に使い分ける - PHPカンファレンス福岡2024
ysknsid25
2
130
TypeScriptで設定しておきたいオプションを逆引きで紹介する - kansai.ts #7
ysknsid25
1
18
ぼっち・ざ・りもーと! 〜フルリモならオフラインLTへ行け!〜
ysknsid25
1
9
東遊園地近辺のおすすめランチ・カフェ
ysknsid25
1
27
変な先入観を捨てて、 とりあえず関西のLT会で発表してみない?
ysknsid25
1
12
ChatGPT Visionで色々実験したまとめ - Kobe Engineer SakeBash #3 with HACK.BAR
ysknsid25
1
29
Flutter on the Webでアプリを作り、 React/Next.jsの違いを体感する - FlutterKaigi mini Osaka #1 with Mix Leap Study #75
ysknsid25
3
55
Nest.jsを使ってみたら とても開発体験がよかった話 - 関西Node学園 11時限目
ysknsid25
0
28
eslint-plugin-securityを導入して、 低労力で堅牢なコードを作る
ysknsid25
1
31
Featured
See All Featured
Atom: Resistance is Futile
akmur
260
25k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.2k
The Mythical Team-Month
searls
217
42k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
24
1.7k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
19
7.1k
A Tale of Four Properties
chriscoyier
154
22k
Creatively Recalculating Your Daily Design Routine
revolveconf
213
11k
Six Lessons from altMBA
skipperchong
22
3.2k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
13
1.1k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
353
28k
Ruby is Unlike a Banana
tanoku
96
10k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
128
32k
Transcript
Google I/O 2024で発表された Firebase App HostingでNext.jsの SSRを試す Copyright © 2024
blessing software. All Rights Reserved. Kanon (@samurai_se) #GDG_Kyoto 1
自己紹介 2 Kanon 株式会社 虎の穴ラボ 個人事業 blessing software samurai_se ↓詳しくは↓
• 3次元に嫁が1人います。2次元にはたくさんいます。 • 水瀬いのりライブTで神戸から色んなテックカンファレンスに登壇してる人です • 最近「アイコンみたことある!」と声かけていただける率が増えてて嬉しい • 本業はKtor(Kotlin), Next.jsで副業がLaravel, Nest.js,Next.js Copyright © 2024 blessing software. All Rights Reserved.
祝!! 新機能リリース 🎉 3 Copyright © 2024 blessing software. All
Rights Reserved.
簡単にFirebase関連のリリース • App Hosting ◦ CloudRunと統合して簡単にSSRができるようになった • Data Connect ◦
CloudSQLでホストされているPostgreSQLに直接接続できるようになった ◦ GraphQLベースの簡潔な言語で定義できる • Geminiをより簡単に使えるようにSDKが追加 • モニタリングの強化 4 Copyright © 2024 blessing software. All Rights Reserved.
Webエンジニアの自分として特に気になったもの • App Hosting ◦ CloudRunと統合して簡単にSSRができるようになった • Data Connect ◦
CloudSQLでホストされているPostgreSQLに直接接続できるようになった ◦ GraphQLベースの簡潔な言語で定義できる • Geminiをより簡単に使えるようにSDKが追加 • モニタリングの強化 5 Copyright © 2024 blessing software. All Rights Reserved.
Webエンジニアの自分として特に気になったもの • App Hosting ◦ CloudRunと統合して簡単にSSRができるようになった • Data Connect ◦
CloudSQLでホストされているPostgreSQLに直接接続できるようになった ◦ GraphQLベースの簡潔な言語で定義できる • Geminiをより簡単に使えるようにSDKが追加 • モニタリングの強化 6 Copyright © 2024 blessing software. All Rights Reserved. そのうち今回は App Hosting を試してみた話
App Hosting Copyright © 2024 blessing software. All Rights Reserved.
7
App Hostingとは 8 Copyright © 2024 blessing software. All Rights
Reserved.
App Hostingとは • Firebase Hostingの代替品というわけではない ◦ 静的なアプリなら従来の Hosting ◦ SSRなどサーバーサイドでの処理が必要なら
App Hosting ◦ このように棲み分ける • 料金 ◦ App HostingはBlazeプランでのみ利用可能 9 Copyright © 2024 blessing software. All Rights Reserved.
これまでFirebase HostingでSSRを使うには • Cloud FunctionsやCloudRunの構築を自分でやらないといけな かった ◦ 過去の自分のブログをみると、やろうとしてめっちゃハマってた • 一方でVercelにデプロイするとその辺意識せずに勝手にデプロイ
してくれる ◦ 個人リリースのアプリなので、「ほな Vercelでええやん」となった • そういう人たちを今回やっと取り込みに来た感がある 10 Copyright © 2024 blessing software. All Rights Reserved.
当時の私の困りっぷり 11 Copyright © 2024 blessing software. All Rights Reserved.
検証の方法 Copyright © 2024 blessing software. All Rights Reserved. 12
Vercelで動いているアプリで検証 13 Copyright © 2024 blessing software. All Rights Reserved.
Vercelで動いているアプリで検証 14 Copyright © 2024 blessing software. All Rights Reserved.
Vercelで動いているアプリで検証 15 Copyright © 2024 blessing software. All Rights Reserved.
この部分を Server Actions で取得している デプロイ ↓ 表示できれば動い ている
App Hostingを始める Copyright © 2024 blessing software. All Rights Reserved.
16
プロジェクトを作り、App Hostingを選択 17 Copyright © 2024 blessing software. All Rights
Reserved.
画面の案内に従って、GitHubリポジトリと接続 18 Copyright © 2024 blessing software. All Rights Reserved.
最後まで進むと勝手にデプロイが始まる 19 Copyright © 2024 blessing software. All Rights Reserved.
SSRのログなどはCloudRun側に統合されている 20 Copyright © 2024 blessing software. All Rights Reserved.
しばらく待つとデプロイが完了し… 21 Copyright © 2024 blessing software. All Rights Reserved.
きちゃあああああああああ 🎉 22 Copyright © 2024 blessing software. All Rights
Reserved.
感想 • 画面ぽちぽちしてただけでデプロイが終わった • なによりすごいのは、VercelからFirebaseに移行するにあたって コードを一行も変えていないこと ◦ 設定ファイルすらいじってない • 試せてないけど、GitHubインテグレーションされているので、バー
ジョンのロールアウトなんかも簡単にできるらしい 23 Copyright © 2024 blessing software. All Rights Reserved.
24 こんなに素晴らしいのにまだパブリックプレビュー版! Copyright © 2024 blessing software. All Rights Reserved.
新機能など楽しみに待ちたい
25 Copyright © 2024 blessing software. All Rights Reserved. 📢
最後に宣伝だけ 🙏 オフラインLT会を 神戸で開催します! オンラインでも毎朝もくもく会 してます!
26 Copyright © 2024 blessing software. All Rights Reserved. 📢
最後に宣伝だけ 🙏 PHP以外の話も ウェルカムです!! GCPの話もしにきて ください!
27 ご清聴、あざざました Copyright © 2024 blessing software. All Rights Reserved.
Copyright © 2024 blessing software. All Rights Reserved. Illustrated by
@amon_mikio おわりに 三ノ宮で待ってます!! samurai_se