I am having problems starting the Node application. I get "TypeError: Cannot call the push method from undefined". Here is my code:
spdy.createServer(credentials, app).listen(app.get('port'), function(req, res) {
res.push('public/js/bootstrap.min.js', {'content-type': 'application/javascript'}, function(err, stream) {
stream.end('alert("hello from push stream!")');
});
res.push('public/js/jquery.min.js', {'content-type': 'application/javascript'}, function(err, stream) {
stream.end();
});
res.push('public/css/bootstrap.min.css', {'content-type': 'text/css'}, function(err, stream) {
stream.end();
});
res.end('Hello World!');
console.log('Express HTTPS SPDY server listening on port ' + app.get('port'));
} );
I am running SDPY version 1.19.2 and NodeJS version 0.10.25.
source
share