I have the follow code:
connect().
use(connect.vhost(virtualHostName, staticServerApp))...
If I wanted to add another virtual host dynamically, say, based on an app configuration change, how would I do that?
This pattern:
var app = connect();
for(var uri in Conf.VIRTUAL_HOST){
app.use(connect.vhost(Conf.VIRTUAL_HOST[uri], staticServerApp));
}
Appears to work.