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
サーバーサイドKotlin/JS
Search
Yuta Tomiyama
September 13, 2020
Programming
0
460
サーバーサイドKotlin/JS
秋のLT大会 2020 Online にて発表
Yuta Tomiyama
September 13, 2020
Tweet
Share
More Decks by Yuta Tomiyama
See All by Yuta Tomiyama
ビルドプロセスをデバッグしよう!
yt8492
1
390
モバイルアプリ開発を始めよう!
yt8492
0
88
Git勉強会
yt8492
0
190
なんでもやってみる勇気
yt8492
0
120
Android Autoが思ったよりしんどい話
yt8492
0
230
apollo-kotlinにcontributeした話
yt8492
0
170
DMM TVのSDカードダウンロード機能を実装した話
yt8492
1
920
今だからこそ知りたいKotlin Multiplatform
yt8492
0
320
State management and API calls in Jetpack Compose: Learning Apollo + Jetpack Compose through React Hooks
yt8492
0
1.3k
Other Decks in Programming
See All in Programming
朝日新聞のデジタル版を支えるGoバックエンド ー価値ある情報をいち早く確実にお届けするために
junkiishida
1
190
個人開発は儲からない - それでも開発開始1ヶ月で300万円売り上げた方法
taishiyade
0
110
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
1.8k
iOSアプリでフロントエンドと仲良くする
ryunakayama
0
110
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
790
PJのドキュメントを全部Git管理にしたら、一番喜んだのはAIだった
nanaism
0
200
Rubyと楽しいをつくる / Creating joy with Ruby
chobishiba
0
180
ふん…おもしれぇ Parser。RubyKaigi 行ってやるぜ
aki_pin0
0
110
要求定義・仕様記述・設計・検証の手引き - 理論から学ぶ明確で統一された成果物定義
orgachem
PRO
1
360
CSC307 Lecture 08
javiergs
PRO
0
690
ノイジーネイバー問題を解決する 公平なキューイング
occhi
0
120
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
200
Featured
See All Featured
Utilizing Notion as your number one productivity tool
mfonobong
3
230
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
61
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
280
The Curse of the Amulet
leimatthew05
1
9k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Believing is Seeing
oripsolob
1
65
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Code Review Best Practice
trishagee
74
20k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
200
Bash Introduction
62gerente
615
210k
Transcript
サーバーサイドKotlin 秋のLT大会 2020 Online
自己紹介 HN: マヤミト 会津大学26期 (学部3年) Zli 現代表 GitHub: https://github.com/yt8492 好きな言語:
Kotlin, Java, Scala 趣味: Kotlin, 同人音声, VTuber ポートフォリオ: https://yt8492.com/ Twitter: yt8492
Kotlinでできること - JVM - Javaでできること全般 - Android - サーバーサイド(Ktor, Spring
Boot, etc...) - JS - Webフロント - Node.js - Native
Kotlinでできること - JVM - Javaでできること全般 - Android - サーバーサイド(Ktor, Spring
Boot, etc...) - JS - Webフロント - Node.js - Native
今日はKotlinのサーバーサイド フレームワークを紹介していきます
今日はKotlinのサーバーサイド フレームワークを紹介していきます
今日はKotlinのサーバーサイド フレームワークを紹介していきません
Kotlinでできること - JVM - Javaでできること全般 - Android - サーバーサイド(Ktor, Spring
Boot, etc...) - JS - Webフロント - Node.js - Native
Kotlinでできること - JVM - Javaでできること全般 - Android - サーバーサイド(Ktor, Spring
Boot, etc...) - JS - Webフロント - Node.js - Native
今日はKotlin/JSでサーバーサイド開発をす る話をします
サーバーサイドKotlin/JS 秋のLT大会 2020 Online
そもそもKotlin/JSとは - KotlinをJSにトランスパイルする技術 - JSのライブラリも利用可能 - Kotlinで型定義を書けばJSのコードに型を付けられる - Webフロントエンドの開発もNode.jsでサーバーサイドの開発もできる トランスパイル
kotlinx-nodejs Kotlin公式が提供しているKotlin向けNode.jsラッパーライブラリ https://github.com/Kotlin/kotlinx-nodejs NodeのAPIのKotlinの型定義を提供している(が、まだexperimentalなため不完全な模 様) TypeScriptの型定義をKotlinの型定義に変換するDukatというツールで生成されている
簡単なサーバーを書いてみよう ゴール: HTTPリクエストを送ったらurlとmethodが返される簡単なサーバーを立てる
プロジェクトのセットアップ IntelliJ IDEAでKotlin/JS for Node.jsの新規プロジェクトを作成
プロジェクトのセットアップ Kotlinバージョン: 1.4.0 build.gradleの依存にkotlinx-nodejsを追加し、ターゲットをnodejsにする
サーバーのコード
起動&実際にリクエストを叩いてみる
できた
感じたこと 良かった点 - 起動が爆速 - 意外と普通にできてしまった 問題点 - Nodeのhttpパッケージだけで本格的にサーバーサイド開発するのはキツい -
get("/hoge") { ... } みたいに書けたほうがよさそう (expressみたいに) - DBを扱うライブラリが現状なさそう
次回予告 Kotlin/JSのサーバーサイドフレームワーク 作ってみた
開発中!
リンク集 kotlinx-nodejs https://github.com/Kotlin/kotlinx-nodejs 今回のもう少し細かい解説 https://qiita.com/yt8492/items/1271b30ecd26f5ca0efb 開発中フレームワーク https://github.com/yt8492/indikate 過去のLT資料 https://speakerdeck.com/yt8492