protocat
TypeScript icon, indicating that this package has built-in type declarations

0.6.5-beta.1 • Public • Published

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.

Versions

Current Tags

Version History

Package Sidebar

Install

npm i protocat

Homepage

proto.cat

Weekly Downloads

690

Version

0.6.5-beta.1

License

MIT

Unpacked Size

219 kB

Total Files

98

Last publish

Collaborators

  • grissius