Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    express-subdomainspublic

    express-subdomains

    Build Status

    Subdomains are placed at the beginning of a route by default.

    Example

     
    var subdomains = require('express-subdomains')
        , express = require('express')
        , app = Express.createServer()
     
    // example: api.example.com/user -> '/api/user' 
     
    subdomains
      .use('api')
      .use('other.vanity.domain')
     
    app.use(subdomains.middleware)
     
    app.get('/api/user' function (req, res, next) {
      // .. 
    })
     
    app.listen()
        

    Tests

    npm install mocha -g and make test

    Install

    npm install express-subdomains

    License

    MIT

    Keywords

    none

    install

    npm i express-subdomains

    Downloadslast 7 days

    24

    version

    0.0.5

    license

    none

    last publish

    collaborators

    • avatar