UNPKG

learnyounode

Version:

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

15 lines (13 loc) 298 B
'use strict' const http = require('http') const 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) })) })