Joel
Joel

Reputation: 23140

In Corda, `No installed custom CorDapps.` on node's built-in webserver

I have defined a CorDapp including an API. However, when I deploy the CorDapp and run my nodes, I see the following message at the webserver URL:

No installed custom CorDapps.

How can I get my node's built-in webserver to load my API?

Upvotes: 0

Views: 253

Answers (1)

Joel
Joel

Reputation: 23140

For the node's built-in webserver to load the API, you must do two things:

  1. Create a WebServerPluginRegistry class that lists your API (example):

    class MyWebPlugin : WebServerPluginRegistry {
        override val webApis = listOf(Function(::MyApi))
    }
    
  2. List the fully-qualified class name of your web plugin under resources/META-INF/services, in a file called net.corda.webserver.services.WebServerPluginRegistry (example)

    • List one fully-qualified plugin class name per line

Upvotes: 0

Related Questions