Skip to content

Instantly share code, notes, and snippets.

@stuckless
stuckless / serve.gradle
Created July 22, 2016 12:24
Gradle 'serve' task to create simple http server and serve files from the current directory
task serve << {
SimpleHttpFileServerFactory factory = new SimpleHttpFileServerFactory()
HttpFileServer server = factory.start(new File("."), 8085)
println("Server Started on 8085 ctrc+c to kill it")
java.lang.Thread.sleep(Long.MAX_VALUE);
}