Skip to content

Instantly share code, notes, and snippets.

@srdjan
Last active August 29, 2015 14:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save srdjan/9753ff9a8cd3282dad90 to your computer and use it in GitHub Desktop.
Save srdjan/9753ff9a8cd3282dad90 to your computer and use it in GitHub Desktop.
//scala
vertx.createHttpServer().requestHandler({ req: HttpServerRequest =>
req.response()
.putHeader("Content-Type", "text/html")
.end("<html><body><h1>Hello from Vert.x!" +
"</h1></body></html>")
}).listen(8080)
//groovy
vertx.createHttpServer().requestHandler({ req ->
req.response()
.putHeader("Content-Type", "text/html")
.end("<html><body><h1>Hello from Vert.x!" +
"</h1></body></html>")
}).listen(8080)
//javascript
vertx.createHttpServer().requestHandler(req =>
req.response()
.putHeader("Content-Type", "text/html")
.end("<html><body><h1>Hello from Vert.x!" +
"</h1></body></html>")
).listen(8080)
@srdjan
Copy link
Author

srdjan commented May 16, 2015

...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment