Newer
Older
labs / tiddlers / content / labs / lab07 / _Labs_07_Add Jooby to Your Project.md
@Mark George Mark George on 18 Aug 907 bytes WIP lab 7

Add the following to the dependencies section of your <> file:

def joobyVer = '2.15.1'
implementation group: 'io.jooby', name: 'jooby-netty', version: joobyVer;
implementation group: 'io.jooby', name: 'jooby-gson', version: joobyVer;

Save and build the project to force Gradle to download the libraries.

Jooby does not provide its own web server so needs to be run on top of another server. In this case we are using Netty as the server. Netty provides a high-performance Java-based web server. We could use Jetty here, but we don't need all of the extra Java EE stuff that Jetty provides --- Netty is smaller and faster.

The Gson dependency allows Jooby to convert domain objects to and from JSON.

Jooby itself is installed as a transitive dependency of either of the other two libraries so we don't need to explicitly add Jooby to the <> file.