koa-rx-router
v0.3.1
Published
Expose koa-router middleware as rx observables.
Downloads
31
Readme
koa-rx-router
Overview
Extends koa-router by exposing paths as rx observables
Usage
Install:
npm install koa-rx-router
Basic Usage:
import * as RxRouter from 'koa-rx-router'
let router = new RxRouter({
prefix: '/mlListener'
})
let observable = server.post('/myPath').map(function(value){
return value + ' Hello World'
})
observable.subscribe(function(value){
console.log(value)
})