Instant web application

// On GET /hi or POST /hi return a "Hello World" web page
On.page("/hi").mvc("Hello <b>world</b>!");
config.yml
gui:
  brand: 'Cool app!'
  title: 'the head title'
  search: true
  menu:
    Home: /
    Portfolio: /portfolio
    About:
      About Us: /about
      About You: /

Let's send some HTTP requests and check the results:

GET /hi
Hello world!

HTTP server routes information:

Verb Path Zone Content type MVC View name Roles
GET POST /hi main html hi

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="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
 
    <groupId>com.example</groupId>
    <artifactId>my-example</artifactId>
    <version>1.0.0-SNAPSHOT</version>
 
    <dependencies>
        <dependency>
            <groupId>org.rapidoid</groupId>
            <artifactId>rapidoid-quick</artifactId>
            <version>5.3.4</version>
        </dependency>
    </dependencies>
 
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
 
</project>

Building the project with Maven is easy:
mvn package