Mali

A minimalistic gRPC microservice framework for Node.js

README

Mali


A minimalistic gRPC microservice framework.
npm version build status coverage status JavaScript Style Guide License chat on gitter Donate Buy me a coffee

Installation


Install module and required peer dependencies.

  1. ```
  2. $ npm install mali @grpc/grpc-js @grpc/proto-loader
  3. ```

Example


  1. ``` js
  2. const Mali = require('mali')

  3. function sayHello (ctx) {
  4.   ctx.res = { message: `Hello ${ctx.req.name}` }
  5. }

  6. function main () {
  7.   const app = new Mali('helloworld.proto')
  8.   app.use({ sayHello })
  9.   app.start('0.0.0.0:50051')
  10. }
  11. ```

Documentation



License


Apache-2.0