0.0.5 • Published 11 years ago
express-subdomains v0.0.5
express-subdomains
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