Hyperledger Composer Rest Server与Cloudant NoSQL DB的连接 [英] Hyperledger Composer Rest Server connection with Cloudant NoSQL DB
问题描述
我正在尝试设置 Hyperledger Composer Rest Server (
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
推荐答案
Composer Rest Server使用回送,因此 COMPOSER_DATASOURCES 是回溯数据源.为了使用cloudant,您需要使用npm安装loopback-conector-cloudant
,然后将数据源设置为:
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.
这篇关于Hyperledger Composer Rest Server与Cloudant NoSQL DB的连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!