Merge pull request #5093 from murgatroid99/node_examples_package

Make Node examples package self-contained
pull/4922/merge
Michael Lumish 9 years ago
commit 41208893d4
  1. 4
      examples/node/greeter_client.js
  2. 4
      examples/node/greeter_server.js
  3. 7
      examples/node/package.json
  4. 4
      examples/node/route_guide/route_guide_client.js
  5. 4
      examples/node/route_guide/route_guide_server.js

@ -1,6 +1,6 @@
/* /*
* *
* Copyright 2015, Google Inc. * Copyright 2015-2016, Google Inc.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -33,7 +33,7 @@
var PROTO_PATH = __dirname + '/helloworld.proto'; var PROTO_PATH = __dirname + '/helloworld.proto';
var grpc = require('../../'); var grpc = require('grpc');
var hello_proto = grpc.load(PROTO_PATH).helloworld; var hello_proto = grpc.load(PROTO_PATH).helloworld;
function main() { function main() {

@ -1,6 +1,6 @@
/* /*
* *
* Copyright 2015, Google Inc. * Copyright 2015-2016, Google Inc.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -33,7 +33,7 @@
var PROTO_PATH = __dirname + '/helloworld.proto'; var PROTO_PATH = __dirname + '/helloworld.proto';
var grpc = require('../../'); var grpc = require('grpc');
var hello_proto = grpc.load(PROTO_PATH).helloworld; var hello_proto = grpc.load(PROTO_PATH).helloworld;
/** /**

@ -0,0 +1,7 @@
{
"name": "grpc-examples",
"version": "0.1.0",
"dependencies": {
"grpc": "0.12.0"
}
}

@ -1,6 +1,6 @@
/* /*
* *
* Copyright 2015, Google Inc. * Copyright 2015-2016, Google Inc.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -36,7 +36,7 @@ var fs = require('fs');
var parseArgs = require('minimist'); var parseArgs = require('minimist');
var path = require('path'); var path = require('path');
var _ = require('lodash'); var _ = require('lodash');
var grpc = require('../../../'); var grpc = require('grpc');
var routeguide = grpc.load(__dirname + '/route_guide.proto').routeguide; var routeguide = grpc.load(__dirname + '/route_guide.proto').routeguide;
var client = new routeguide.RouteGuide('localhost:50051', var client = new routeguide.RouteGuide('localhost:50051',
grpc.Credentials.createInsecure()); grpc.Credentials.createInsecure());

@ -1,6 +1,6 @@
/* /*
* *
* Copyright 2015, Google Inc. * Copyright 2015-2016, Google Inc.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -35,7 +35,7 @@ var fs = require('fs');
var parseArgs = require('minimist'); var parseArgs = require('minimist');
var path = require('path'); var path = require('path');
var _ = require('lodash'); var _ = require('lodash');
var grpc = require('../../../'); var grpc = require('grpc');
var routeguide = grpc.load(__dirname + '/route_guide.proto').routeguide; var routeguide = grpc.load(__dirname + '/route_guide.proto').routeguide;
var COORD_FACTOR = 1e7; var COORD_FACTOR = 1e7;

Loading…
Cancel
Save