kproxy
v1.0.0
Published
Proxy middleware for koa
Downloads
5
Readme
KPROXY
Simple proxy for Koa@next. Defers actual proxying to node-http-proxy
import Koa from 'koa'
import { GET } from 'kro'
import proxy from 'kproxy'
const app = new Koa()
app.use(GET('/hello')(async ctx => {
ctx.body = 'hello!'
}))
app.use(kproxy('http://localhost:4000'))
app.listen(3000)