Naivete Precedes Misrepresentation
    Wondering what’s next for npm?Check out our public roadmap! »

    protocat

    0.6.2 • 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.

    Install

    npm i protocat

    DownloadsWeekly Downloads

    1,179

    Version

    0.6.2

    License

    MIT

    Unpacked Size

    212 kB

    Total Files

    90

    Homepage

    proto.cat

    Last publish

    Collaborators

    • avatar