0.0.1 • Published 10 years ago

argo-subdomain v0.0.1

Weekly downloads
2
License
-
Repository
github
Last release
10 years ago

Subdomain parser for argo.

Simple middleware for argo that will parse out the subdomain attached to the host header and place it in the environment variable.

###Usage

var subdomain = require('argo-subdomain');
var argo = require('argo');

argo()
  .use(subdomain)
  .use(function(handle) {
    handle('response', function(env, next) {
      console.log(env.request.subdomain);
      next(env);
    });
  })
  .listen(3000);