RESTful service one-liner

Running this single line of code will start a web server embedded in your application.

By default, the server listens on port 8888 and address (matching any IP address).

Navigating to http://localhost:8888/size?msg=abc will return 3.

// On GET /size return the length of the "msg" parameter
On.get("/size").json((String msg) -> msg.length());
GET /size?msg=abc

HTTP server routes information:

Verb Path Zone Content type MVC View name Roles
GET /size main json

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