Skip to content

Instantly share code, notes, and snippets.

@Raynos
Created August 31, 2011 16:17
Show Gist options
  • Save Raynos/1183926 to your computer and use it in GitHub Desktop.
Save Raynos/1183926 to your computer and use it in GitHub Desktop.
// start bootstrap
require("../bootstrap.js");
// wait for app
var app;
// if ready set app
mediator.on('server.listening', function(server) {
app = server;
});
is.config({
"server": {
"factory": function(cb) {
// when vows ask for server either give it
if (app) {
return cb(app);
}
// or wait for it to start
mediator.on("server.listening", function(s) { cb(s); }
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment