Skip to content

Instantly share code, notes, and snippets.

@itsmeritesh
Created July 8, 2013 18:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itsmeritesh/5951230 to your computer and use it in GitHub Desktop.
Save itsmeritesh/5951230 to your computer and use it in GitHub Desktop.
Unable to get this working. I am using Groovy 2.0.5 and JDK 1.7.10
import org.vertx.java.core.Vertx
import org.vertx.java.core.http.HttpServer
class HttpServerTest {
Vertx vertx
HttpServer httpServer
HttpServerTest() {
vertx = Vertx.newVertx()
httpServer = vertx.createHttpServer()
}
def startServer(){
httpServer.requestHandler { def request -> println "this is a test"}.listen(8080, "localhost")
}
public static void main(String[] args){
new HttpServerTest().startServer()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment