Node HTTP host router
... does what it's called: It routes HTTP request by their host.
Features
- Wildcards and Regular Expressions
- Unmatching operator
- WebSocket support (HTTPS comming later)
- Full Express-integration (optional)
Example
var router = express = http = ; // Raw function to handle request { res;} // Express appvar app = ;app; // HTTP servervar server = http; // Do routing;
Routers
foobar.com
Only works for foobar.com
.
.yolo.nl
Routes hi.yolo.nl
, sub.foo.yolo.nl
but not yolo.nl
.
/some-regexp/
A normal Regular Expression, e.g. some-regexp.com
or baz.sume-regexp.hi.nz
.
License
Attribution 3.0 Unported (CC BY 3.0)
Attribution
Just refer to this repository in some page like imprint, about or contact. Please.