Reputation: 2230
I am working with composer 0.19.8
to develop hyperledger blockchain app. My problem is that every time I make changes to the blockchain models I have to update the business network version in package.json
and restart the fabric server in order for changes to reflect on Composer REST Server. If I do not do that the changes I made are not reflected on the rest server API(generated API by composer-rest-server
command).
Is there a way to override the current business network version instead of updating to a new version number in the package.json
file?
Upvotes: 0
Views: 173
Reputation: 5570
Hyperledger Composer is now 'compliant' with the standard way of deploying and upgrading chaincode on the Fabric, so you are stuck with this I'm afraid.
With each new version of the Network that you create there will be a new Docker Image and a new Docker container created, so if you are working with many iterations in your development you will want to clean up these old versions.
If you want to do quick testing and don't need the REST server, you could use the Composer Playground either online here, or by running locally. If you use it on line, or locally using the Web Profile, the Business Network is run in a simulated Fabric in the Browser local storage, and this is a fast process to upgrade and test.
Update Following Comment When you upgrade a Business Network you don't loose the data - you may loose visibility of the data! This happens if you change the model and add fields without making them optional. There are more details of this in the Composer Knowledge Wiki section on Data Migration.
Upvotes: 1