0
votes

I read in “Node services” docs (URL: “https://docs.corda.net/node-services.html#corda-web-server” ) that the Corda web server may be removed in future and replaced with sample specific webapps using a standard framework like Spring Boot.

In the article “Writing a CorDapp” (URL: “https://github.com/corda/corda/blob/master/docs/source/writing-a-cordapp.rst”) it is mentioned that corda-webserver is not production ready.

I had been reading “cordapp-example” code quite some time and was about to use it. Now since this sample makes use of corda-webserver, I cannot use it as it is.

Please answer couple of questions -

Are there any plans to make corda-webserver production ready? Are there any plans to re-develop “cordapp-example” using “Spring boot” framework in place of “corda-webserver”?

1

1 Answers

4
votes

The current plan is to develop a Spring Boot webserver in a separate repository to replace the existing Jetty webserver. There are no timelines for this currently.

However, you can easily create your own Spring Boot webserver by following the Spring Webserver sample here. The Spring Boot webserver is split into three files:

  • Server.kt, where we define the Spring Boot server
  • NodeRPCConnection.kt, where we define a class that allows an RPC connection to be made to the node
  • Controller.kt, where we define the endpoints offered by the Spring Boot server

As written, the controller provides endpoints to interact with the Yo! CorDapp. However, it can easily be customised to interact with the Example CorDapp.