This package has been deprecated
Author message:
Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
koa-forwarding
1.0.0 • Public • Published KOA_FORWARDING
Install
npm install koa-forwarding
yarn add koa-forwarding
Usage
import Koa from 'koa';
import forwarding from 'koa-forwarding';
const app = new Koa();
const HOST = '0.0.0.0';
const PORT = 8080;
app
.use(forwarding({
host: 'miaooo.me',
match: /\/st.*/,
map: p => `/perfix/${p}`,
}))
.listen(PORT, HOST);
// 0.0.0.0:8080/static => miaooo.me/perfix/static
// 0.0.0.0:8080/ts => 404
See also
Package Sidebar
Install
Weekly Downloads