Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 1.48 KB

README.md

File metadata and controls

37 lines (25 loc) · 1.48 KB

ktor-hello-world

based on this Udemy Course Section 2

Topics Covered

  • Embedded Server vs. Engine Main
  • Multiple Modules
  • Running locally on port 8080
  • Passing URL Params
  • Passing Query Parameters
  • Returning Custom Object
  • Try / Catch with various error codes
  • Redirecting to another URL
  • Serving static content -> text, html, jpg
  • HTML DSL

Project Setup

  • Configured using IntelliJ's Ktor Configurator vs. following the course.
  • Ktor Project Generator Is also very useful to configure and create the project with all necessary plugins / resources.

Configs

Referenced this Config Example as a model for the build.gradle

Plugin Integration

Followed Ktor Docs for Content Negotiation and Serialization.

  • Add Dependencies: Content Negotiation + Json
  • Install Content Negotiation
  • Configure a Serializaer -> Json

Static Content

Course is using deprecated calls for serving static content. I implemented what was recommended in the Ktor Docs