Skip to content

Instantly share code, notes, and snippets.

@Narigo
Created November 15, 2014 12:21
Show Gist options
  • Save Narigo/669f5c43bf82f683acee to your computer and use it in GitHub Desktop.
Save Narigo/669f5c43bf82f683acee to your computer and use it in GitHub Desktop.
class CreateHttpServer extends Verticle {
def start(): Future[Unit] = {
/* example-code-start */
vertx.createHttpServer(HttpServerOptions(
host = "localhost",
port = 8080
)).requestHandler(req => {
req.response().setChunked(true).end("<html><body><h1>Hello from vert.x!</h1></body></html>");
}).listen();
/* example-code-end */
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment