Quickstart
import { ProtoCat } from 'protocat'
import { CatService } from '../dist/cat_grpc_pb'
app = new ProtoCat()
app.addService(CatService, {
getCat: async call => {
const cat = await getCatByName(call.request?.getName() ?? '')
call.response.setName(cat.name)
.setHealth(cat.health)
.setLevel(cat.level)
.setClass(cat.profession ?? 'warrior')
}
}
app.start('0.0.0.0:3000', ServerCredentials.createInsecure())
Docs
Learn more about ProtoCat in docs.
Support
Project is sponsored by Ackee.
See also
- Mali - Minimalistic Node.js gRPC microservice framework
- BloomRPC - GUI Client for GRPC Services
- ghz - Simple gRPC benchmarking and load testing tool
- grpc-health-probe - A command-line tool to perform health-checks for gRPC applications in Kubernetes etc.
License
This project is licensed under MIT.