Samples are a series of self-contained applications that can you browse through to understand different ways to accomplish things in Ktor.
- Chat Application. Ktor application using web sockets and sessions to simulate a chat application.
- Fullstack Client and Server Application. A Kotlin/JS client application talking to a Ktor server application.
- HTTP Bin. An implemention of HttpBin using Ktor, demonstrating the majority of endpoints and functionality available.
- Kweet. A messaging application simulating Twitter, and using Freemarker template engine.
- Reverse Proxy. A Reverse Proxy implementation.
- Reverse Proxy with WebSockets. A Reverse Proxy implementation which uses WebSockets.
- YouKube. Demonstrates how to create an application that allows for uploading and viewing of videos, using Kotlinx.html as the templating engine.
- Kodein DI. Using Kodein Dependency Injection framework with Ktor.
- File Listing. How to create a file listing for a static site.
- Location Header. Demonstrating how to use HTTP Location header.
- Redirect with Exception. Creating an HTTP direct when an exception is thrown.
- RxJava. How to use RxJava in combination with Ktor.
- Server-Sent Events. Using Server-Sent Events to trigger callbacks on the client.
- Structured Logging. Demonstrates how to log applications calls during the different phases of request and response pipeline.
- Client Multipart. Ktor client that can send multipart data.
- Running Ktor with GraalVM. Run a Ktor Server application which uses a CIO engine, with GraalVM
- Google AppEngine. Deploying a Ktor application to Google AppEngine, using Maven as the build tool.