Im working on couple of sites, both have 2 versions, live one and dev one. http://timeprize.com and http://test.timeprize.com They both run on the same port and server, using express vhost.
My vhost app looks very simple, and is basically this:
var evh = require('express-vhost'),
express = require('express');
/*... some more variable declarations ...*/
if ( site_enabled('test.timeprize.com') ) {
/**/
evh.register('test.timeprize.com', function() {
var app = express();
app = require("../test_app/app.js").run_app(http);
return app;
}() );
};
if ( site_enabled('timeprize.com') ) {
evh.register('timeprize.com', function() {
var app = express();
app = require("../live_app/app.js").run_app(http);
return app;
}() );
};
/*... more sites below ...*/
Im running the code above using "forever" process.
And now the problem. Since the test site, and live site are both running on the same server/port using same process, how do i update/restart the test site, without interrupting the live site ?