Skip to content

Instantly share code, notes, and snippets.

@spullara
Created January 6, 2013 20:48
Show Gist options
  • Save spullara/4470115 to your computer and use it in GitHub Desktop.
Save spullara/4470115 to your computer and use it in GitHub Desktop.
JDK8 is going to be great. Webbit is also really nice (based on Netty).
package webserver;
import org.webbitserver.WebServers;
public class App {
public static void main(String[] args) {
WebServers.createWebServer(8080).add((req, res, con) -> {
res.content("Hello, world!").end();
}).start();
}
}
@olympum
Copy link

olympum commented Jan 7, 2013

Very slick. Will you be able to do optional function parameters in JDK8?

@spullara
Copy link
Author

spullara commented Jan 7, 2013

If you mean default parameters, no. Still have to rely on overloading. It is on my list to get in along with local type inference for variables.

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