Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mfellner/koa-rx

RxJS middleware for koa
https://github.com/mfellner/koa-rx

koa middleware rxjs

Last synced: 3 days ago
JSON representation

RxJS middleware for koa

Awesome Lists containing this project

README

        

# koa-rx   [![Build Status](https://travis-ci.org/mfellner/koa-rx.svg?branch=master)](https://travis-ci.org/mfellner/koa-rx) [![codecov](https://codecov.io/gh/mfellner/koa-rx/branch/master/graph/badge.svg)](https://codecov.io/gh/mfellner/koa-rx)

RxJS middleware for koa. Return Observables in your middleware.

### Usage

```javascript
const Koa = require('koa')
const koaRx = require('koa-rx').default

const app = new Koa()
app.use(koaRx())
app.use(ctx => Observable.of(418).do(n => ctx.status = n))
```