0.4.2 • Published 6 years ago

andela-mali v0.4.2

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
6 years ago

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