@intactile/express-domain-middleware

An express middleware providing domain informations

Stats

StarsIssuesVersionUpdatedCreatedSize
@intactile/express-domain-middleware
000.3.05 years ago5 years agoMinified + gzip package size for @intactile/express-domain-middleware in KB

Readme

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

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.