Skip to content

Santinell/koa-jrpc2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Koa-JRPC2

Koa middleware for JRPC2

INSTALL

npm install koa-jrpc2

USING

Using with Koa as middleware:

var rpc = require('jrpc2');
var koaMiddleware = require('koa-jrpc2');
var _ = require('koa-route');
var app = require('koa')();
var rpcServer = new rpc.server();

rpcServer.loadModules(__dirname + '/modules/', function () {
    app.use(_.post('/api', koaMiddleware(rpcServer)));
    app.listen(80);
});

About

Koa middleware for JRPC2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published