@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
    

    Keywords

    none

    Install

    npm i @intactile/express-domain-middleware

    DownloadsWeekly Downloads

    1

    Version

    0.3.0

    License

    Apache-2.0

    Last publish

    Collaborators

    • intactile