https://github.com/ldclakmal/ktor-samples
Kotlin - Ktor Sample
https://github.com/ldclakmal/ktor-samples
client http kotlin ktor sample server
Last synced: about 1 year ago
JSON representation
Kotlin - Ktor Sample
- Host: GitHub
- URL: https://github.com/ldclakmal/ktor-samples
- Owner: ldclakmal
- Created: 2018-11-22T06:12:52.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-12-05T22:19:52.000Z (over 2 years ago)
- Last Synced: 2025-01-12T10:25:52.803Z (about 1 year ago)
- Topics: client, http, kotlin, ktor, sample, server
- Language: Kotlin
- Homepage: https://ktor.io
- Size: 18.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ktor Sample
## What is Ktor
Ktor is a framework to easily build connected applications – web applications, HTTP services, mobile and browser applications. Modern connected applications need to be asynchronous to provide the best experience to users, and Kotlin coroutines provide awesome facilities to do it in an easy and straightforward way.
- More info: https://ktor.io/
## About project
This project creates sample HTTP client and HTTP servers with minimum configurations.
## How to run
1. Make a clone of this project.
```shell
$ git clone https://github.com/ldclakmal/ktor-sample.git
```
2. Build the project.
```shell
$ mvn clean install
```
3. Open the project with [IntelliJ IDEA](https://www.jetbrains.com/idea/) for better user experience.
4. Run the `*.kt` files with `main` functions.
```kotlin
fun main(args: Array) {
}
```
5. Access the services with the configured port and path.
```
Eg.: http://localhost:9090/demo
```
#### References:
1. https://blog.jetbrains.com/kotlin/2018/11/ktor-1-0/
2. https://ktor.io/quickstart/index.html