andela-mali
v0.4.2
Published
Minimalistic gRPC microservice framework
Downloads
2
Maintainers
Readme
A minimalistic gRPC microservice framework.
Installation
$ npm install mali
Example
const path = require('path')
const Mali = require('mali')
const PROTO_PATH = path.resolve(__dirname, '../protos/helloworld.proto')
async function sayHello (ctx) {
ctx.res = { message: 'Hello '.concat(ctx.req.name) }
}
function main () {
const app = new Mali(PROTO_PATH)
app.use({ sayHello })
app.start('0.0.0.0:50051')
}
Documentation
Full documentation.
License
Apache-2.0