Skip to content

Instantly share code, notes, and snippets.

Java HTTP Server
HttpServer server = HttpServer.create(new InetSocketAddress(config.healthCheckServerPort), 0)
server.createContext("/health", new HealthCheckHttpHandler(healthCheckRegistry))
server.setExecutor(null)
server.start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment