A Quick Guide to htmx in Kotlin

To be more specific, we will see a step-by-step process of writing HTML with typesafe Kotlin DSL, integrating htmx, and handling requests with Ktor. Eventually, we will get the below user table: But before we start, just a short disclaimer: although the main focus for this tutorial is the htmx …

Auto-reload in Ktor

Together, we will learn how to enable the Ktor development mode in several ways and how auto-reload can help with the Kotlin HTML DSL app example. Quick Ktor Setup As the first step, let’s quickly prepare a basic Ktor application responding with HTML. To do so, let’s navigate to the …

Run SQL Server Linux container images with Docker

In this post, you use Docker to pull and run the SQL Server Linux container image and see the demo of connecting from SQL Server Management Studio (SSMS). Open your PowerShell with elevated permission and run the following command. It pulls the SQL Server 2022 (16.x) Linux container image from …

How to Perform MS SQL Server Restore with RECOVERY and NORECOVERY Options

Introduction Backing up the database in MS SQL Server is vital to safeguard and recover the data in case of scenarios, like hardware failure, server failure, database corruption, etc. MS SQL Server provides different types of backups, such as differential, transactional, and full backup. A full backup allows you to …

MockK with Coroutines [5/5]

At this point, we spent a lot of time exploring MockK features and syntax, so at this point, adding coroutines will be trivial, trust me Of course, you can find the rest of the series on my blog, too: Getting Started with MockK in Kotlin [1/5] Verification in MockK [2/5] …

MockK: Spy, Relaxed Mock, and Partial Mocking [4/5]

In the fourth article in a series, we are going to learn what are MockK spies, relaxed mocks and how to do a partial mocking. At this point, we know quite a lot about mocks, verification, and how to perform stubbings. In this lesson, we are going to expand our …

MockK: Objects, Top-Level, and Extension Functions [3/5]

This tutorial is a great example of why MockK is an excellent choice for Kotlin and how easy we can work with Kotlin features, such as the previously mentioned objects. Of course, you can find the rest of the series on my blog, too: Getting Started with MockK in Kotlin …

Verification in MockK [2/5]

To be more specific, we are going to work with both verification and capturing– MockK Kotlin features, allowing us to perform assertions against our mocks. To view other articles in this series, please take a look at: Getting Started with MockK in Kotlin [1/5] Verification in MockK [2/5] MockK: Objects, …

Getting Started with MockK in Kotlin [1/5]

Before we head there, we will take a quick look at what exactly mocking is, and the differences between several terms that often lead to confusion. Thanks to that, we will have a solid foundation before diving into the MockK and Kotlin topics. Getting Started with MockK in Kotlin [1/5] …

MongoDB with Kotlin Coroutines in Ktor

In this article, I will show you how to work with MongoDB and Kotlin coroutines in a Ktor application. Note: this article was created based on one of the services we implement in my Ktor Server Pro course. If you would like to learn how to expose a fully functional …