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
Serverless FrameworkとVue.jsのSSRでWebサイトを作った話
Search
Yuichi Shundo
March 08, 2017
Programming
1
760
Serverless FrameworkとVue.jsのSSRでWebサイトを作った話
Yuichi Shundo
March 08, 2017
Tweet
Share
Other Decks in Programming
See All in Programming
StoreKit2によるiOSのアプリ内課金のリニューアル
kangnux
0
110
サイコロで理解する統計的仮説検定の考え方
tatamiya
4
950
Hanami and htmx
bkuhlmann
0
210
Goのエラースタックトレースの歴史と今後
sonatard
9
1.5k
Git Lint
bkuhlmann
4
750
Netty Chicago Java User Group 2024-04-17
sullis
0
180
1BRC--Nerd Sniping the Java Community
gunnarmorling
0
340
if constexpr文はテンプレート世界のラムダ式である
faithandbrave
3
650
DMMプラットフォームがTiDB Cloudを採用した背景
pospome
8
4.1k
OpenAPIを中心に考えるAPI開発入門 / Introduction to API Development with a Focus on OpenAPI
seike460
PRO
2
170
Snowflakeで眠ったデータを起こそう!
estie
0
120
TCAとKMPを用いた新規動画配信アプリ 「ABEMA Live」の設計
tomu28
1
110
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
16
2.6k
Building Applications with DynamoDB
mza
88
5.6k
Making the Leap to Tech Lead
cromwellryan
124
8.5k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
226
51k
Clear Off the Table
cherdarchuk
84
310k
Robots, Beer and Maslow
schacon
PRO
155
7.9k
4 Signs Your Business is Dying
shpigford
175
21k
Atom: Resistance is Futile
akmur
259
25k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
30
6k
Debugging Ruby Performance
tmm1
70
11k
Building Your Own Lightsaber
phodgson
99
5.7k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
241
1.2M
Transcript
Serverless Framework & Vue.jsͷSSRͰ WebαΠτΛ࡞ͬͨ גࣜձࣾΧϥμϝσΟΧ Yuichi Shundo ( @shundoroid
)
ࣗݾհ • גࣜձࣾΤϜςΟʔΞΠ • גࣜձࣾΧϥμϝσΟΧ (ΤϜςΟʔΞΠࢠձࣾ) ग़ Android ΞϓϦɺUnity(ήʔϜΤϯδϯ) ɺASP.Net
MVC Microsoft Azure ɺAWS
serverlessͰ࡞ͬͨαΠτ CaraCoro https://caracoro.jp ݱҩࢣ͕Ϣʔβʔ͔Βͷ࣭ ʹճ͢ΔใΛίϯςϯπͱ ͯ͠ఏڙ͢ΔϝσΟΞαΠτ
։ൃڥ • Serverless Framework 1.4 • node.js 4.3 • TypeScript
2.1 • Vue.js 1.0 • Visual Studio Code (ΤσΟλ)
Vue.js JavaScriptϑϨʔϜϫʔΫ ܰྔ MVVM (Model-View-ViewModel) ࠓͷ͓Ͱग़ͯ͜ͳ͍͜ͱ ɾSPA ɾModel-ViewόΠϯσΟϯά
࠷ॳͷߏ (Client-Side-Rendering) RDS Lambda S3 CloudFront API Gateway
੩తϑΝΠϧ܈ HTML, JS, CSS, Image ಈతίϯςϯπऔಘAPI (QAใɺίϥϜ) ΫϥΠΞϯτ (Webϒϥβ) Route53 Vue.js
͔͠͠… • SEOͷ • GoogleʹVueͷςϯϓϨʔτܗࣜͰΠϯσοΫε͞Εͯ͠·ͬͨ
αʔόʔαΠυϨϯμϦϯά (SSR) • αʔόαΠυͰHTMLΛߏஙͯ͠ϨεϙϯεΛฦ͢ɻ • ΫϥΠΞϯτଆ͔Β੩తͳHTMLϖʔδʹݟ͑Δɻ SEOతͳΛղফ
SSRʹม͑ͨߏ RDS Lambda S3 CloudFront API Gateway ੩తϑΝΠϧ܈
JS, CSS, Image ΫϥΠΞϯτ Route53 HTMLvueςϯϓϨʔτ lambdaͷϩʔΧϧʹอ࣋ text/htmlܗࣜͷ ϨεϙϯεΛฦ͢
1.X 2.X • ެࣜͰSSRʹରԠ • Third-Party ϥΠϒϥϦ vue-server
࠶Ϋϩʔϥʔʹొ
CaraCoroͰݱࡏະରԠ • Catch-all • URLͰҙͷύεʹରͯ͠API GatewayΛݺͼग़ͤΔ • Proxy-integration • API
GatewayͱlambdaͰςϯϓϨʔτϚοϐϯάΛॻ͘ඞཁ͕ͳ͍ •։ൃͨ͠ॳ͜ΕΒͷػೳ͕ແ͔ͬͨ •͍ۙ͏ͪʹରԠ͍ͨ͠!!
serverless.yml (catch-allະରԠ)
serverless.yml (catch-allରԠޙ)