Learning Ktor In 7 Days (server side Kotlin)

Learning Ktor In 7 Days (server side Kotlin)

Join My Newsletter 👉

Learning Ktor in 7 days was not something I thought was possible, but to my surprise I was able to do it. For those unaware, ktor is an asynchronous framework for creating microservices, web applications, and APIs. This backend framework for Kotlin is fun, free, and open source. Basically if you are using Kotlin spring boot, you are doing it wrong. If you want to check out the finished project go to

🚶‍♂️ FOLLOW ME 🚶‍♂️
Website –
Discord –
Twitter –
Medium –

Ktor is a networking framework for Kotlin that allows you to build servers and clients. Ktor clients are multiplatform ready which allows sharing code between Android, iOS, and JavaScript, while we don’t cover that in this video it is a really unique feature that is worth mentioning.

If you are looking at how to become an expert in Ktor this video won’t have all of the answers, although it will help you with getting started with Ktor.

We start out by walking through the official tutorial for creating HTTP APIs with Ktor, followed by writing my first API to retrieve recent YouTube videos. I also take a detour to add Google Cloud Datastore as a light caching layer.

On the third day I wanted to focus on how to run Ktor inside of a Docker container and in the span of 30 minutes I was doing just that. With a lot of extra time I decided to deploy Ktor to Google Cloud Run and also had the chance to use Google Cloud Build.

The fourth day had me creating another API, this time it was for adding email addresses to my Mailchimp account. At this point I had to learn more about error handling with Ktor and also added some much needed instrumentation.

The fifth and final day was deployment day. I packaged everything up and pushed it up to Google Cloud Run. I also deployed my static website to Google Cloud Storage and set up a load balancer to direct traffic correctly.

Website –
Source Code –
Creating HTTP APIs with Ktor –
Ktor with Docker –
Hosting a static website with Google Cloud Storage –
Deploying container images to Google Cloud Run –

0:00 – Intro
0:45 – The Ktor HTTP APIs Tutorial
4:12 – Recent YouTube Videos with Ktor
7:32 – Running Ktor Inside of Docker
9:38 – Email Marking with Ktor
12:02 – Deploying Ktor to Google Cloud Run

Camera –
Lens –
Microphone –
Recorder –
Main Lights –
External Monitor –
* Note: the above links are affiliate links.

Monitor –
Headphones –
MacBook Pro 2019 –
* Note: the above links are affiliate links.

Try Epidemic Sound:

#softwareengineer #softwaredeveloper

14 thoughts on “Learning Ktor In 7 Days (server side Kotlin)

  1. Thanks for the video man ❤️✌️
    How is ktor so far? Did you use any kind of user authentification in your server?
    Hope you do more videos like this one ✌️✌️

  2. while creating container it gives me this error
    Failed to deploy '<unknown> Dockerfile: Dockerfile': Can't retrieve image ID from build stream

  3. Great video!!! It's been a while since I've done anything with Kotlin. Might have to check out ktor!

  4. Couple thing I added to my Ktor environments is Koin for DI and JetBrains – Exposed Framework for Database connection.
    Kotlin makes is so easy to integrate all of it.
    Also couple added extension methods make it easy to read path's parameter values or query values.

Leave a Reply

Your email address will not be published. Required fields are marked *