Vaadin Coroutines Demo
Demoes the possibility to use coroutines in a Vaadin 14 app. Please read the Vaadin and Kotlin Coroutines blogpost for explanation of the ideas behind this project.
Online Demo of the Vaadin Coroutines Demo running on Heroku.
To quickly start the app, make sure that you have Java 8 JDK installed. Then, just type this into your terminal:
git clone https://github.com/mvysny/vaadin-coroutine-demo cd vaadin-coroutine-demo ./gradlew build appRun
The app will be running on http://localhost:8080/
To compile the entire project, run
To run the application, run
./gradlew appRun and open http://localhost:8080/.
This will allow you to quickly start the example app and allow you to do some basic modifications. For real development we recommend Intellij IDEA Ultimate, please see below for instructions.
Development with Intellij IDEA Ultimate
The easiest way (and the recommended way) to develop Karibu-DSL-based web applications is to use Intellij IDEA Ultimate. It includes support for launching your project in any servlet container (Tomcat is recommended) and allows you to debug the code, modify the code and hot-redeploy the code into the running Tomcat instance, without having to restart Tomcat.
- First, download Tomcat and register it into your Intellij IDEA properly: https://www.jetbrains.com/help/idea/2017.1/defining-application-servers-in-intellij-idea.html
- Then just open this project in Intellij, simply by selecting
File / Open...and click on the
build.gradlefile. When asked, select "Open as Project".
- You can then create a launch configuration which will launch this example app in Tomcat with Intellij: just scroll to the end of this tutorial: https://kotlinlang.org/docs/tutorials/httpservlets.html
- Start your newly created launch configuration in Debug mode. This way, you can modify the code
Ctrl+F9to hot-redeploy the code. This only redeploys java code though, to redeploy resources just press
Ctrl+F10and select "Update classes and resources"