mali
Version:
Minimalistic gRPC microservice framework
45 lines (31 loc) • 1.66 kB
Markdown
# [](https://malijs.github.io)
**A minimalistic [gRPC](http://www.grpc.io) microservice framework.**
[](https://www.npmjs.com/package/mali)
[](https://github.com/malijs/mali/actions)
[](https://coveralls.io/github/malijs/mali)
[](https://standardjs.com)
[](https://raw.githubusercontent.com/malijs/mali/master/LICENSE)
[](https://gitter.im/malijs/Lobby)
[](https://www.paypal.me/bojandj)
[](https://www.buymeacoffee.com/bojand)
## Installation
Install module and required peer dependencies.
```
$ npm install mali @grpc/grpc-js @grpc/proto-loader
```
## Example
```js
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](https://mali.js.org).
## License
Apache-2.0