aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/node/examples
diff options
context:
space:
mode:
Diffstat (limited to 'src/node/examples')
-rw-r--r--src/node/examples/math_server.js2
-rw-r--r--src/node/examples/perf_test.js3
-rw-r--r--src/node/examples/qps_test.js3
-rw-r--r--src/node/examples/route_guide_client.js3
-rw-r--r--src/node/examples/route_guide_server.js2
-rw-r--r--src/node/examples/stock_client.js3
-rw-r--r--src/node/examples/stock_server.js2
7 files changed, 11 insertions, 7 deletions
diff --git a/src/node/examples/math_server.js b/src/node/examples/math_server.js
index b1f8a6323f..31892c65df 100644
--- a/src/node/examples/math_server.js
+++ b/src/node/examples/math_server.js
@@ -115,7 +115,7 @@ server.addProtoService(math.Math.service, {
});
if (require.main === module) {
- server.bind('0.0.0.0:50051');
+ server.bind('0.0.0.0:50051', grpc.ServerCredentials.createInsecure());
server.start();
}
diff --git a/src/node/examples/perf_test.js b/src/node/examples/perf_test.js
index da919eced5..0f38725f72 100644
--- a/src/node/examples/perf_test.js
+++ b/src/node/examples/perf_test.js
@@ -41,7 +41,8 @@ var interop_server = require('../interop/interop_server.js');
function runTest(iterations, callback) {
var testServer = interop_server.getServer(0, false);
testServer.server.listen();
- var client = new testProto.TestService('localhost:' + testServer.port);
+ var client = new testProto.TestService('localhost:' + testServer.port,
+ grpc.Credentials.createInsecure());
function runIterations(finish) {
var start = process.hrtime();
diff --git a/src/node/examples/qps_test.js b/src/node/examples/qps_test.js
index 00293b464a..1ce4dbe070 100644
--- a/src/node/examples/qps_test.js
+++ b/src/node/examples/qps_test.js
@@ -61,7 +61,8 @@ var interop_server = require('../interop/interop_server.js');
function runTest(concurrent_calls, seconds, callback) {
var testServer = interop_server.getServer(0, false);
testServer.server.listen();
- var client = new testProto.TestService('localhost:' + testServer.port);
+ var client = new testProto.TestService('localhost:' + testServer.port,
+ grpc.Credentials.createInsecure());
var warmup_num = 100;
diff --git a/src/node/examples/route_guide_client.js b/src/node/examples/route_guide_client.js
index 8cd532fef1..647f3ffaba 100644
--- a/src/node/examples/route_guide_client.js
+++ b/src/node/examples/route_guide_client.js
@@ -40,7 +40,8 @@ var path = require('path');
var _ = require('lodash');
var grpc = require('..');
var examples = grpc.load(__dirname + '/route_guide.proto').examples;
-var client = new examples.RouteGuide('localhost:50051');
+var client = new examples.RouteGuide('localhost:50051',
+ grpc.Credentials.createInsecure());
var COORD_FACTOR = 1e7;
diff --git a/src/node/examples/route_guide_server.js b/src/node/examples/route_guide_server.js
index 70044a322c..bb8e79b5bd 100644
--- a/src/node/examples/route_guide_server.js
+++ b/src/node/examples/route_guide_server.js
@@ -239,7 +239,7 @@ function getServer() {
if (require.main === module) {
// If this is run as a script, start a server on an unused port
var routeServer = getServer();
- routeServer.bind('0.0.0.0:50051');
+ routeServer.bind('0.0.0.0:50051', grpc.ServerCredentials.createInsecure());
var argv = parseArgs(process.argv, {
string: 'db_path'
});
diff --git a/src/node/examples/stock_client.js b/src/node/examples/stock_client.js
index b37e66df07..ab9b050e9b 100644
--- a/src/node/examples/stock_client.js
+++ b/src/node/examples/stock_client.js
@@ -38,7 +38,8 @@ var examples = grpc.load(__dirname + '/stock.proto').examples;
* This exports a client constructor for the Stock service. The usage looks like
*
* var StockClient = require('stock_client.js');
- * var stockClient = new StockClient(server_address);
+ * var stockClient = new StockClient(server_address,
+ * grpc.Credentials.createInsecure());
* stockClient.getLastTradePrice({symbol: 'GOOG'}, function(error, response) {
* console.log(error || response);
* });
diff --git a/src/node/examples/stock_server.js b/src/node/examples/stock_server.js
index f2eb6ad4ab..dfcfe30eb4 100644
--- a/src/node/examples/stock_server.js
+++ b/src/node/examples/stock_server.js
@@ -80,7 +80,7 @@ stockServer.addProtoService(examples.Stock.service, {
});
if (require.main === module) {
- stockServer.bind('0.0.0.0:50051');
+ stockServer.bind('0.0.0.0:50051', grpc.ServerCredentials.createInsecure());
stockServer.listen();
}