Upgrade to Pro — share decks privately, control downloads, hide ads and more …

おうちにAPIを生やすお話.pdf

yagi2
August 03, 2018
440

 おうちにAPIを生やすお話.pdf

yagi2

August 03, 2018
Tweet

Transcript

  1. Ktor • ΊͬͪΌബ͍WebΞϓϦͷϑϨʔϜϫʔΫ ( https://github.com/ktorio/ktor ) • ඇಉظॲཧ΋͍͍ײ͡ʹͳ͍ͬͯΔ • KotlinͷCoroutinesͱ͍͏ػೳ

    fun main(args: Array<String>) { embeddedServer(Netty, 8080) { routing { get("/") { call.respondText("Hello, world!", ContentType.Text.Html) } } }.start(wait = true) }
  2. ࠓճͷߏ੒ • API • Kotlin+KtorΛRaspberryPi্Ͱಈ͔͢ʢࣗ୐಺ʣ • ΫϥΠΞϯτ • Webϒϥ΢βʢૉHTMLʣ •

    AndroidΞϓϦʢेീ൪ʣ • Google Home miniʢࣗ୐಺ʣ ※DDNSΛ࢖ͬͯࣗ୐֎͔Β΋APIʹΞΫηεՄೳ