The following are a serie of exercises to get your familiar with Kotlin and Ktor. It's assumed you have a basic understanding of Kotlin and know how to work with Gradle.
Each exercises builds on the previous one, starting with the very basics of
To get you up and running easily, a sample
build.gradle file is provided with all the required dependencies for Ktor and Kotlin. You can import it into your favourite IDE and start
building the exercises on that.
A sample solution is provided for each exercises in the
- Exercise 0: Hello World
- Exercise 1: HTML DSL, POST and Sessions
- Exercise 2: HTML DSL, Typed Routes and Asynchronous Code
- Exercise 3: Creating a Reverse Proxy
- Exercise 4: Autoreload
Below are the solutions for the exercises. Note that your solution doesn't need to exactly match what's presented here. As long as it's generally inline and works, you should be good!