Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save aaronzirbes/b69bf4208aba0b7c0428bf1d322f144e to your computer and use it in GitHub Desktop.
Save aaronzirbes/b69bf4208aba0b7c0428bf1d322f144e to your computer and use it in GitHub Desktop.
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