The Conclave web host server has been introduced as part of the v1.2 release of the Conclave platform. It allows developers to concentrate on building their enclave and client components without worrying about the host part. It serves as a ready-made host for your Conclave application. You could refer to our previous blog for an introduction to the web host server.
In this blog, we will take a look at how we could use the web host server in our Conclave application.
Configuring the host module to use the web host server
Apply the Gradle application
plugin and set the mainClassName
property as shown below. It will allow us to run the web host from the command line.
Notice the shadow plugin has also been added to allow us to package and run the host as a single fat jar containing all the dependencies.
We need to add the webserver as a runtime dependency as shown below. Notice that there are no compile-time dependencies. Since we are using the web host, we do not need to have any code for the host module.
Finally, we need to configure the shadow jar:
Running the web host server
Use the below command to build the shadow jar.