Alpha : Ready for early adopters
node
: This requires node
to be installed. If you instead have the nodejs
executable on Debian, you should install the nodejs-legacy
package.On Mac OS X, install homebrew. On Linux, install linuxbrew. Run the following command to install gRPC Node.js.
$ curl -fsSL https://goo.gl/getgrpc | bash -s nodejs
This will download and run the gRPC install script, then install the latest version of gRPC Nodejs npm package.
INSTALL
file in the root of that repository to install the C core library that this package depends on.npm install
.If you install the gRPC C core library in a custom location, then you need to set some environment variables to install this library. The command will look like this:
CXXFLAGS=-I<custom location>/include LDFLAGS=-L<custom location>/lib npm install [grpc]
To run the test suite, simply run npm test
in the install location.
This library internally uses ProtoBuf.js, and some structures it exports match those exported by that library
If you require this module, you will get an object with the following members
function load(filename)
Takes a filename of a Protocol Buffer file, and returns an object representing the structure of the protocol buffer in the following way:
service
member that can be used for constructing servers.function loadObject(reflectionObject)
Returns the same structure that load
returns, but takes a reflection object from ProtoBuf.js
instead of a file name.
function Server([serverOpions])
Constructs a server to which service/implementation pairs can be added.
status
An object mapping status names to status code numbers.
callError
An object mapping call error names to codes. This is primarily useful for tracking down certain kinds of internal errors.
Credentials
An object with factory methods for creating credential objects for clients.
ServerCredentials
An object with factory methods for creating credential objects for servers.