Hyperledger Composer Rest Server connection with Cloudant NoSQL DB

会有一股神秘感。 提交于 2020-01-05 20:27:20

问题


i'm trying to set up the Hyperledger Composer Rest Server (https://hyperledger.github.io/composer/reference/rest-server) in order to work with Cloudant DB on IBM Cloud and store inside it the cards used to interact with the blockchain.

In particular i would like to know how to configure the COMPOSER_DATASOURCES parameter of composer-rest-server.

Thanks in advance for your availability.
Best Regards


回答1:


The Composer Rest Server uses loopback, and so the COMPOSER_DATASOURCES are lookback datasources. In order to use cloudant you would need to use npm to install loopback-conector-cloudant, and then set the data source to be something like:

"mydb": {
  "name": "mydb",
  "connector": "cloudant",
  "username": "XXXX-bluemix",
  "password": "YYYYYYYYYYYY",
  "database": "test"
}

There is good detailed documentation here from loopback.



来源:https://stackoverflow.com/questions/49406092/hyperledger-composer-rest-server-connection-with-cloudant-nosql-db

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!