Sorry To Answer my own question, I wrote my own little library, whenjs, then I came up with this:
// listen.js
var http = require("http")
var when = require("whenjs")
module.exports.init = function(app){
module.__app = app;
module.__appIsReady = false;
var http = http.createServer(function(req,res){
if(module.__appIsReady){
module.__app(req, res)
} else {
when(function(){ return module.__appIsReady; }, function() {
module.__app(req, res)
})
}
})
}
module.exports.ready = function(){
module.__appIsReady = true;
}
// server.js
var listen = require("./listen");
var app = require("express")();
listen.init(app);
// Build The App Here
listen.ready();
I was already having a https and http server, so this makes almost the same amount of sense.
But robertklep had a really great solution too, I just implemented this one first.