fabric-samples/balance-transfer/config.js
Jim Zhang 79cb041124 [FAB-5303] Further balance-transfer code optimization
- 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>
2017-07-26 18:00:05 +00:00

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'));