@trinnylondon/mali
v0.25.0
Published
Minimalistic gRPC microservice framework
Downloads
24
Readme
Cloned from the official repo to add
@grpc/grpc-js
support.
A minimalistic gRPC microservice framework.
Installation
Install module and required peer dependencies.
$ npm install mali grpc @grpc/proto-loader
Example
const Mali = require('mali')
async function sayHello (ctx) {
ctx.res = { message: 'Hello '.concat(ctx.req.name) }
}
function main () {
const app = new Mali('helloworld.proto')
app.use({ sayHello })
app.start('127.0.0.1:50051')
}
Documentation
Full documentation.
License
Apache-2.0