mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
- Made it possible to deploy the app (both the client and fabric backend) to a location other than localhost - Made it possible to work with a backend over grpc instead of always assuming grpcs - Made the list of target peers for instantiate and invoke calls to be optional - Enabled target networks to be controlled by an env variable Change-Id: Ie394cf7e8f6ed47d970d4be992f2f6a0394fff7f Signed-off-by: Jim Zhang <jzhang@us.ibm.com>
14 lines
No EOL
361 B
JavaScript
14 lines
No EOL
361 B
JavaScript
var util = require('util');
|
|
var path = require('path');
|
|
var hfc = require('fabric-client');
|
|
|
|
var file = 'network-config%s.json';
|
|
|
|
var env = process.env.TARGET_NETWORK;
|
|
if (env)
|
|
file = util.format(file, '-' + env);
|
|
else
|
|
file = util.format(file, '');
|
|
|
|
hfc.addConfigFile(path.join(__dirname, 'app', file));
|
|
hfc.addConfigFile(path.join(__dirname, 'config.json')); |