protocat
v0.6.5-beta.1
Published
Modern, minimalist type-safe gRPC framework for Node.js
Downloads
2,539
Maintainers
Readme
ProtoCat
Modern, minimalist type-safe gRPC framework for Node.js
Quickstart
import { ProtoCat } from 'protocat'
import { CatService } from '../dist/cat_grpc_pb' // Generated service definition
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')
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.