argo-subdomain

0.0.1 • Public • Published

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);

Dependencies (0)

    Dev Dependencies (2)

    Package Sidebar

    Install

    npm i argo-subdomain

    Weekly Downloads

    2

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • mdobs