andela-mali

0.4.2 • Public • Published

Mali

A minimalistic gRPC microservice framework.

npm version build status coverage status JavaScript Style Guide License chat on gitter

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

/andela-mali/

    Package Sidebar

    Install

    npm i andela-mali

    Weekly Downloads

    1

    Version

    0.4.2

    License

    Apache-2.0

    Last publish

    Collaborators

    • andela