A demo project that shows how to combine Ktor server applications with GraalVM.
-
Make sure that you have GraalVM installed and
$GRAALVM_HOME
environment variable points to the folder where GraalVM is installed, or alternatively thatnative-image
is on your path (if on Windows). -
Run the command
./gradlew nativeCompile
(orgradlew nativeCompile
on Windows) to build an executable file. -
The previous step produces an executable file named
graal-server
which can then be run. Open uphttp://0.0.0.0:8080
to test the server. -
Run the command
./gradlew nativeTestCompile
(orgradlew nativeTestCompile
on Windows) to build an executable file for tests. -
That step produces an executable file named
graal-test-server
which can then be run.
Using the Netty
engine is not compatible with GraalVM. Please following
the corresponding issue for
updates.
This sample is provided as is under the Apache 2 OSS license.