RESTful service one-liner with Java 8 and Rapidoid

This is NOT the official website
of Java.
Let's see why Java 8 is so great!

We can start an embedded Rapidoid web server and implement a simple RESTful service with 1 line of code (and Rapidoid):
On.get("/size").json((String msg) -> msg.length());
GET /size?msg=xyz
GET /size?msg=hello

Project setup with Maven

To run the example, you need to create a new Java 8 project and configure it properly using Maven:
<project xmlns="" xmlns:xsi=""

Building the project with Maven is easy:
mvn package