Hyperledger Composer-rest-server


(Swati Kasera) #1

@varun : How can i use a single composer-rest-server to have multiple cards associated with it?


(Varun Raj) #2

You can add multiple cards to the wallet.


(Swati Kasera) #3

@varun

So if i have 20 users i need to create 20 cards in my wallet… if yes… then how can i make the composer rest server up with just one user card and other users can use the same card???

Example:
Consider i started my composer rest sever using the below card on port 3053 using the below command:
composer-rest-server -c card-name -p 3053

This card is one of the 20 users cards that i created in my wallet. Then how can i use the same card to login to composer rest server for the other 19 users?


(Varun Raj) #4

You can’t do that with composer rest api I think. It holds the entire bunch of cards and anyone can use any card that has been attached. You need to create your own api server with composer client SDK.

Refer: https://www.skcript.com/svr/how-to-build-nodejs-application-for-your-hyperledger-composer-networks/


(Swati Kasera) #5

Thanks Varun. Will definitely try this out. How about this link?
[https://hyperledger.github.io/composer/latest/integrating/enabling-rest-authentication.html]

Also i would would like to know that what is the max and min limit(data) of the blocks?? and how to configure this?


(Swati Kasera) #6

@varun

Can you help me with what is the max and min limit(data) of the blocks?? and how to configure this?

Also, I am trying to write some composer queries using LIMIT and SKIP operators but it’s not working. It returns me the complete result always. Also, need the count of the data being returned by the query. I know that as of now fabric 1.1 doesn’t support this but still there would be a workaround for this…

Any help would be highly appreciated.


(Varun Raj) #7

Yeah LIMIT & SKIP will not work in fabric itself as they have bug in the framework itself. Hopyfully they are fixing it in Fabric 1.2

https://jira.hyperledger.org/browse/FAB-2809


(Hingjlee) #8

With passport strategy, you can have different instance of to access the REST server.