@intactile/express-domain-middleware

0.3.0 • Public • Published

express-domain-middleware

An express middleware providing domain informations

Build Status Code Climate Test Coverage

Install

npm install @intactile/express-domain-middleware

Usage

import express from 'express';
import domainMiddleware from '@intactile/express-domain-middleware';

const app = express();
app.use(domainMiddleware());
import { Router } from 'express';

const router = new Router();

router.post('/login/', (request, response, next) => {
  const domainInfo = request.domainInfo;
  console.log(domainInfo);
});

example :

domainInfo = { FQDN: 'app.brand.domain.com' // The Fully Qualified Domain Name
               domain : 'brand.domain.com', // The domain name
               host : 'domain.com' }        // The hostname

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.3.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.3.0
    1
  • 0.2.1
    0
  • 0.2.0
    0

Package Sidebar

Install

npm i @intactile/express-domain-middleware

Weekly Downloads

0

Version

0.3.0

License

Apache-2.0

Last publish

Collaborators

  • intactile