README
Context.IO Next
Generated GRPC/Protobutt test client
Structure
index.js
is a wrapping layer for better UX/DX, also handles connecting to the server for youca.pem
is the CA public cert used to generate client certs/keys/lib/cat_pb.js
and/lib/cat_grpc_pb.js
are generated fromcat.proto
Usage
Import the package
const CIO = require('contextio-next')
Connect to the server with your ssl cert and key. You can generate/download these from our futuristic developer console. DO NOT check these into source control or make them publicly accessible!
const client = CIO.CreateClient(cert, key)
Create your request from the objects in
Types
const req = new CIO.Types.NewCatRequest() req.setName(name) req.setColor(color)
Make a call!
client.newCat(req, (err, res) => { if (err) { return console.error(err) } console.log(res) })