connect-subdomains

Add's req.subdomains to requests like connect.vhost did in 1.x

npm install connect-subdomains
1 downloads in the last week
1 downloads in the last month

connect-subdomains

Adds req.subdomains, which is an array of subdomains

Usage

(function () {
  "use strict";

  var connect = require('connect')
    , subdomains = require('connect-subdomains')
    ;

  connect()
    .use(subdomains())
    .use(function (req, res, next) {
        console.log(req.subdomains);
        next();
      })
    .listen(3000)
    ;
}());
npm loves you