This is a simple demo using corda rpc client to connect corda node with ktor.
Now we have 5 properties in the
port: port the ktor server listens on
host: corda node host
username: username needed to connect to node rpc server
password: password needed to connect to node rpc server
rpcPort: node server's RPC port
You can use command
gradle shadowJar to generate your fat jar. You should put you conf.properties under the same directory as the fat jar. You can also override properties with environment variables, the key names of the environment variables are the same as properties. For example:
port=8099 java -jar app-1.0-SNAPSHOT-shadow.jar
then the configuration item named
config.properties will be overridden.
I also gave a restful-style interface to get the node party name :) Go to: