1.0.4 • Published 6 years ago
koa-rewrite-host v1.0.4
koa-rewrite-host
URL rewrite middleware for koa depending on host.
Notice: only supports koa@2
.
Installation
$ npm install koa-rewrite-host
Examples
Rewrite using a when host is localhost, rewriting /home
to /localhost/home
.
app.use(rewrite("localhost:3000", "/localhost"));
License
MIT