@trinnylondon/mali

Minimalistic gRPC microservice framework

Usage no npm install needed!

<script type="module">
  import trinnylondonMali from 'https://cdn.skypack.dev/@trinnylondon/mali';
</script>

README

Cloned from the official repo to add @grpc/grpc-js support.

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.

$ npm install mali grpc @grpc/proto-loader

Example

const Mali = require('mali')

async function sayHello (ctx) {
  ctx.res = { message: 'Hello '.concat(ctx.req.name) }
}

function main () {
  const app = new Mali('helloworld.proto')
  app.use({ sayHello })
  app.start('127.0.0.1:50051')
}

Documentation

Full documentation.

License

Apache-2.0