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
NestJSを活用したREST APIサーバ/REST_API_SERVER_BY_NESTJS
Search
Masahiko Sakakibara
November 29, 2019
0
1.4k
NestJSを活用したREST APIサーバ/REST_API_SERVER_BY_NESTJS
Masahiko Sakakibara
November 29, 2019
Tweet
Share
More Decks by Masahiko Sakakibara
See All by Masahiko Sakakibara
プライベートプロダクト戦略 - フロントエンドカンファレンス沖縄 / private_product_frontend
rdlabo
3
4.2k
GitHubをCMSとして使う話/ using_github_as_CMS
rdlabo
0
350
JavaScriptから デバイスの力を100%引き出すための Web APIとCapacitor入門 / power_from_javascript
rdlabo
0
470
Capacitor4_release
rdlabo
0
580
Web技術で稼ぐため選択肢を俯瞰しよう/options_to_earn_web_technology
rdlabo
0
110
Ionicモバイルアプリ制作入門/get_started_with_ionic
rdlabo
0
96
JavaScript から デバイスの力を 100%引き出すための Capacitor と Angular でのはじめかた。
rdlabo
2
1.7k
JavaScriptとSwift&JavaをつなげるCapacitorと、これからのWeb Frontend/Linking JavaScript with Swift&Java, And the future of Web Frontend.
rdlabo
0
3.6k
事例からみるアプリデザインの成長戦略とWeb Native Platform/app_design_growth
rdlabo
1
780
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
Writing Fast Ruby
sferik
627
61k
The Language of Interfaces
destraynor
154
24k
A Philosophy of Restraint
colly
203
16k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Transcript
/FTU+4Λ׆༻ͨ͠ 3&45"1*αʔό
ࣗݾհ !SEMBCP Ұൠࣾஂ๏ਓ ϦϨʔγϣϯσβΠϯݚڀॴදཧࣄ Ұൠࣾஂ๏ਓ "SFB*OOPWBUJPO"MJBODF$50 *POJD+BQBO 6TFS(SPVQද
ίϯτϦϏϡʔλʔ ionic-team/ionic ionic-team/starters ionic-team/ionic-cli ionic-team/ionic-docs ionic-team/ionic-react -conference-app GoogleChrome/lighthouse
όοΫΤϯυͱϑϩϯτΤϯυͷͭͳ͗ํ
ϨϯμϦϯάίετ͕ॏ͍ಈతαΠτ .PEFMͰσʔλΛܗͯ͠ ߹ʹΑͬͯ$PUSPMMFSͰ ͦΕΛల։ɾ࠶ܗͯ͠ 7JFXͰల։͢Δ
ΤϥʔϋϯυϦϯά͕͍͠ಈతαΠτ
ΑΓΑ͍69Λࢦͯ͠ ੩తαΠτ 4JOHMF1BHF"QQMJDBUJPO 41" 3&45"1*(SBQI2-ʹΑΔόοΫΤ ϯυͱϑϩϯτΤϯυͷϒϦοδ +BWB4DSJQUʹΑΔϦονͳ6*
1SPHSFTTJWF8FC"QQT 18" 41" 8FC"1* ಈతαΠτ ΑΓΑ͍69Λࢦ͢
+40/ͰͷΓͱΓ͕Ұൠతͳख๏ʹɻ όοΫΤϯυ \n^ ϑϩϯτΤϯυ \n^
+40/Ͱൃ͢Δͱ͍͏Ҏ্ͷใڞ༗Ͱ͖͍ͯ·͔͢ʁ όοΫΤϯυ \n^ ϑϩϯτΤϯυ \n^ ѫࡰͯ͠΄͍͠ (&5IFMMP ʁʁ 3&45Ͱɺॲཧํ๏ͱྨ͔͠ఆٛͯ͘͠Εͳ͍ɻ
ཧͷੈք όοΫΤϯυ \n^ \ OBNFTUSJOH EFTDTUSJOH JNBHFTUSJOH VSMTUSJOH ^<> ͰσʔλΛૹΔˠ
ϑϩϯτΤϯυ \n^ \ OBNFTUSJOH EFTDTUSJOH JNBHFTUSJOH VSMTUSJOH ^<> Ͱσʔλ͕ཉ͍͠ ˡ
ͦ͏ͩ5ZQF4DSJQUͩʂ w"1*ͷܕΛڞ༗Ͱ͖Δͷ5ZQF4DSJQU͚ͩʢ wFYQSFTTϑϨʔϜϫʔΫͱͯͪ͠ΐͬͱബ͍ w/FTU+4ϑϨʔϜϫʔΫͱͯ͠ͷػೳ͕े ɾ3&45"1*Λ࠾༻ͯ͠Δ ɾৄࡉυΩϡϝϯτͱͷೋॏཧΛͨ͘͠ͳ͍ ɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹʜϓϩδΣΫτͰΦεεϝ 8FC"TTFNCMZͳͲͷಈ࡞ڥΛআ͖·͢
ܕͷڞ༗ʹ͍ͭͯ
͡Ό͋Ͳ͏ͬͯܕΛڞ༗͢Δʁʁ όοΫΤϯυ \n^ ϑϩϯτΤϯυ \n^ Ͳ͏ͬͯܕΛڞ༗ʁ OQNύοέʔδʹ͢Δ ˕ ཧతɻͨͩ͠อक͕खؒɻ /FTU+4ͷϓϩδΣΫτʹ
ஔ͘ ̋ ݱ࣮తɻϑϩϯτΤϯυ͔Β webpackͰόϯυϧ ϓϩδΣΫτ֎ʹ͓͘ ˚ tscίϚϯυͷઃఆΛཁมߋʢະௐࠪʣ
σϞ ʢձͰͷܕΤϥʔͷ࣮ԋʹͳΓ·͢ʣ
XFCQBDLͱUTDίϚϯυҧ͏ XFCQBDL όϯυϥʔɻUZQFTDSJQUύοέʔδΛར༻͢Δ͜ͱͰɺSFRVJSFؔ JNQPSUؔΛఏڙͯ͠ґଘؔղܾࡁΈͷγϯϓϧͳϑΝΠϧΛग़ྗ͢Δ ͜ͱ͕Ͱ͖Δɻ UTDίϚϯυ 5ZQF4DSJQU͔Β+BWB4DSJQUͷίϯύΠϧΛߦ͏ɻґଘؔग़ྗͷղܾͳ ʹͦΕɻίϯύΠϥͰ͢ɻ
CBEQSBDUJDFUPJOTUBMMEFQFOEFODJFTPOBQSPEVDUJPOTFSWFS IUUQTHJUIVCDPNHPMECFSHZPOJOPEFCFTUQSBDUJDFTJTTVFT
*EPOPUSFDPNNFOEVTJOHBOZCVOEMFSGPS/PEF IUUQTHJUIVCDPNOFTUKTOFTUJTTVFTJTTVFDPNNFOU
"1*ͳΒ࣌ؒಈ͔͞ͳ͍͍ͯ͘ͷͰ ʢ4FSWFSͷอकͨ͘͠ͳ͍ʂʣ
ৗʹΞΫηε͕͋ΔͱݶΒͳ͍ load() { if (this.data) { return of(this.data); } else
{ return this.http.get<IDataJson>(‘https://example.com‘) .pipe(map(this.processData, this)); } } ϝϞϦετϨʔδΛ ׆༻ͨ͠Γ FϥʔχϯάΈ͍ͨʹ සൟͳ"1*ߋ৽͕ͳ͍
ͦ͏ͩʂ-BNCEBͩʂʂ ʮίʔυͷอकͰखҰഋ͔ͩΒαʔόͷอकͨ͘͠ͳ͍ʯ
/PEPDTGSPN ʜͭ͘Εͦ͏͡Όͳ͍ʁ
ͭ͘Εͨɻ ࠓ.FFUVQ͋Δ͔ΒͿΓʹόʔδϣϯਵͨ͠
͍ํ $ npm install serverless -g $ git clone
[email protected]
:rdlabo/serverless-nestjs.git
ʲprojectNameʳ Πϯετʔϧ ։ൃ $ npm start -BNCEB)PUTUBSUαϙʔτ 4XBHHFSαϙʔτ $ npx ts-node src/swagger.ts
ϑϩϯτΤϯυͱόοΫΤϯυͰڞ௨ݴޠΛ खʹೖΕΑ͏ɻ ϩδΧϧʹָͰ͖Δ/FTU+4͍͍Ͱ͢Α
*POJDΛ͏ͱ8FCͰϞόΠϧΞϓϦͭ͘Ε·͢ ϒϥβ 18" J04ΞϓϦ
͜͏͍͏ΞϓϦ͕ʹͭ͘ΕΔΑ͏ʹʂ
*POJDͰ࡞ΔϞόΠϧΞϓϦ੍࡞ೖ ୯ߦຊr ϖʔδɹ ԁ IUUQTBN[OUP1"S&M