UNPKG

learnyounode

Version:

Learn You The Node.js For Much Win! An intro to Node.js via a set of self-guided workshops.

14 lines (12 loc) 281 B
var http = require('http') var bl = require('bl') http.get(process.argv[2], function (response) { response.pipe(bl(function (err, data) { if (err) { return console.error(err) } data = data.toString() console.log(data.length) console.log(data) })) })