{% extends "../helloWorld.html" %} {% block demoSectionClasses %}demo_hello_world_quick{% endblock %} {% block meta_title %}Demo - Hello World - Quick{% endblock %} {% block meta_description %}"Hello World!" demo and tutorial using Spincast - Quick version{% endblock %} {% set demoId = "quick" %} {% block demoBody %}

1. Quick version!

First, we add the latest version of the org.spincast:spincast-default Maven artifact to our pom.xml (or build.gradle) :

<dependency>
    <groupId>org.spincast</groupId>
    <artifactId>spincast-default</artifactId>
    <version>{{spincast.spincastCurrrentVersion}}</version>
</dependency>

Then :

public class App {

    public static void main(String[] args) {
        Spincast.init(args);
    }

    @Inject
    protected void init(DefaultRouter router, Server server) {
        router.GET("/").save(context -> context.response().sendHtml("<h1>Hello World!</h1>"));
        server.start();
    }
}

Explanation :
( Tip : try hovering/clicking the page numbers below! )

Try it!

Download this application, and run it by yourself :

The application is then accessible at http://localhost:44419

{% endblock %}