Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

stream-to-file.js 360B

1234567891011121314
  1. var fs = require('fs'),
  2. needle = require('./..'),
  3. path = require('path');
  4. var url = process.argv[2] || 'http://www.google.com/images/errors/robot.png';
  5. var file = path.basename(url);
  6. console.log('Downloading ' + file + '...');
  7. needle
  8. .get(url)
  9. .pipe(fs.createWriteStream(file))
  10. .on('done', function() {
  11. console.log('Done!')
  12. })