Skip to content

Commit

Permalink
Merge pull request #48 from Rich-Harris/fix-https-registry
Browse files Browse the repository at this point in the history
use HTTPS registry
  • Loading branch information
Sven SAULEAU authored May 26, 2018
2 parents 7bc69ad + 6c8bc49 commit 1ec3731
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const sander = require( 'sander' );

exports.root = path.resolve( __dirname );
exports.tmpdir = process.env.NOW ? `/tmp` : `${exports.root}/.tmp`;
exports.registry = `http://registry.npmjs.org`;
exports.registry = 'https://registry.npmjs.org';

if ( !process.env.NOW ) {
try {
Expand Down
6 changes: 3 additions & 3 deletions server/utils/get.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const http = require( 'http' );
const https = require( 'https' );

module.exports = function get ( url ) {
return new Promise( ( fulfil, reject ) => {
http.get( url, response => {
https.get( url, response => {
let body = '';

response.on( 'data', chunk => {
Expand All @@ -16,4 +16,4 @@ module.exports = function get ( url ) {
response.on( 'error', reject );
});
});
};
};

0 comments on commit 1ec3731

Please sign in to comment.