Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/antonarhipov/ktor-native-image

Ktor GraalVM naive image example
https://github.com/antonarhipov/ktor-native-image

Last synced: about 2 months ago
JSON representation

Ktor GraalVM naive image example

Awesome Lists containing this project

README

        

## Ktor GraalVM native image example

Run:
```shell
./gradlew clean nativeCompile
```
The native binary is generated to `./build/native/nativeCompile/graalvm-server`

Run:
```shell
./build/native/nativeCompile/graalvm-server
```
```
2024-06-04 17:26:19.378 [main] INFO ktor.application - Autoreload is disabled because the development mode is off.
2024-06-04 17:26:19.382 [main] INFO ktor.application - Application started in 0.005 seconds.
2024-06-04 17:26:19.387 [DefaultDispatcher-worker-1] INFO ktor.application - Responding at http://0.0.0.0:8080
```

Run:
```shell
curl localhost:8080
```
```
Data(id=324, title=Hello, description=This is the response)
```