mw-queue
Creates request handling middleware. Incoming requests will be queued until a handler is added. Once a handler is added all queued requests will be flushed to the handler. Further requests will go straight to the handler.
Example:
var http = ;var createMwQueue = ; { var q = ; // Not ready to handle requests yet, need to load files or do something async ; return q;} http;
API:
- createMwQueue - Creates a new queue
- .setHandler(mw) - Set a middleware handler which will accept the incoming requests