// In order to run this example you need to
// generate local ssl certificate
varunion=require('../../lib'),director=require('director');varrouter=newdirector.http.Router();varserver=union.createServer({before:[function(req,res){varfound=router.dispatch(req,res);if(!found){res.emit('next');}}],spdy:{key:'./certs/privatekey.pem',cert:'./certs/certificate.pem'}});router.get(/foo/,function(){this.res.writeHead(200,{'Content-Type':'text/plain'})this.res.end('hello world\n');});server.listen(9090,function(){console.log('union with director running on 9090 with SPDY');});