malijs / mali

A minimalistic gRPC microservice framework for Node.js

Home Page:https://mali.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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-js @grpc/proto-loader

Example

const Mali = require('mali')

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

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

Documentation

Full documentation.

License

Apache-2.0

About

A minimalistic gRPC microservice framework for Node.js

https://mali.js.org

License:Apache License 2.0


Languages

Language:JavaScript 100.0%