A simple HTTPS server with one endpoint.
Before running the server, first run the makecert.sh script, which will put a
server.crt and server.key file in src/main/resources, generated by the
openssl
command.
In one terminal, cd into the source directory and run:
sbt run
In another terminal, do this to have curl call the endpoint, allowing self-signed cert:
curl -k https://localhost:8080/ping
If you omit the -k
argument to curl
, then you will get an error from curl
and the server will log an SSL handshake error.