Mali
Minimalistic Node.js gRPC microservice framework
Modern JavaScript
Mali is designed for usage with modern asynchronous mechanisms utilizing `Promises` or `async / await`.
Metadata
Mali supports header, trailer, status, and error metadata.
Middleware
Cascading middleware can be composed to extend the minimal core and add additional features.
(opens new window) (opens new window) (opens new window) (opens new window) (opens new window) (opens new window) (opens new window) (opens new window)
# Full server in a few lines of code...
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')
}
main()