Add an event listener before existing listeners.
Event listeners always fire in the order they are added, yet sometimes we have no control over this ordering and require certain listeners to definitely run before any others.
var http =var Overshadow =var server = httpserver
Alternatively, manually detach and reattach listeners:
var overshadow =overshadow// attach whatever listeners you needserverovershadow// remember to reattach old listeners
We've included a simple
.then(fn) method you can call to make chainable the process of detaching, doing something then reattaching.
.then(fn) does nothing but execute the supplied function
// remember to reattach old listeners