Dockmaster
Dockmaster is a vhost middleware router for Distribute that uses Seaport to intelligently route requests.
Usage
Router
var http = distribute = seaport = dockmaster = ; // Connect to the Seaport servervar ports = ; /* * Create the httpServer and register it with Seaport. * The noroute attribute passed to seaport will prevent Docmaster routing to its self. */var httpServer = http; // Wrap the httpServer with distributevar router = ; // Use the Dockmaster middlewarerouter;
Applications
For the above router to route to your apps you will need to register your applications with Seaport. As so:
var http = express = seaport = ; // Connect to the Seaport servervar ports = ; // Create your app and register it with Seaportvar app = ;app;
You can also mount applications on paths so you can have multiple applications sharing the same domain.
var app = ;app;
License
MIT