Skip to content

zappalex/ktor-hello-world

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published