kproxy

1.0.0 • Public • Published

KPROXY Build Status

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)

/kproxy/

    Package Sidebar

    Install

    npm i kproxy

    Weekly Downloads

    3

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • rrdelaney