📜 ⬆️ ⬇️

SPDY protocol support in Node.JS

donnerjack13589 announced a new module for Node.JS , node-spdy , which adds support for the SPDY protocol , which was proposed by Google and implemented in Chromium / Google Chrome and on Google's websites ( more ... ).

Let me remind you that the main goal in creating the SPDY protocol was to reduce delays in the delivery of content.

An example of using the node-spdy module:
var options = { key: fs.readFileSync(__dirname + '/../keys/spdy-key.pem'), cert: fs.readFileSync(__dirname + '/../keys/spdy-cert.pem'), ca: fs.readFileSync(__dirname + '/../keys/spdy-csr.pem'), NPNProtocols: ['spdy/2'] }; spdy.createServer(options, function(req, res) { res.writeHead(200); res.end('hello world!'); }); 

')
Community help is welcome.

Source: https://habr.com/ru/post/117957/


All Articles