This basic HTTP server written in ZIO and ZIO-http provides a simple "Hello World" in response to a GET in the "/" route.
The idea is to demonstrate how to build a native-image executable built by GraalVM Native Image.
To simply run the application locally, use ./mill hello.run
. To run the tests, use ./mill hello.test
.
To build the executable (requires GraalVM JDK, use:
./mill hello.nativeImage
test with:
❯ curl -s http://localhost:8080
Hello World!%
To generate a Linux executable using Docker, run:
❯ DOCKER_NATIVEIMAGE=1 ./mill show hello.nativeImage