Skip to content

yoshuawuyts/koa-vhost

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

koa-vhost

Vhost middleware for Koa. Checks subdomains for

Example

var vhost = require('koa-vhost');

// check for api.localhost:port in development
// check for api.mysite.com in production
app.use(vhost('api', someMiddleware())); 

// disable localhost support in development
app.use(vhost('api', someMiddleware(), {localhost: false}));

// glob matching (TODO)
app.use(vhost('*.api', someMiddleware()));

License

MIT © Yoshua Wuyts

About

Vhost middleware for Koa

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published