/mali

A minimalistic gRPC microservice framework for Node.js

Primary LanguageJavaScriptApache License 2.0Apache-2.0

Mali

A minimalistic gRPC microservice framework.

npm version build status

Mali is still in development and preview state. It is good for exploration, but may not be suitable for production use yet.

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