'use strict';
const artistIds = require('./artist-ids');
-const http = require('http');
+const https = require('https');
const JSONStream = require('JSONStream');
const limit = 7; // The number of songs to retrieve for each artist
const parser = JSONStream.parse(['results', true]);
popIds.concat(rapIds, rockIds).join() +
'&entity=song&limit=' +
limit,
- port: 80
+ port: 443
};
/**
throw err;
}
process.stdout.write('Loading sample tracks... ');
- http.get(options, function(res) {
+ https.get(options, function(res) {
res.pipe(parser);
});
});