diff --git a/dynamodb/config.json b/dynamodb/config.json index dc7d7a3..47ea23a 100644 --- a/dynamodb/config.json +++ b/dynamodb/config.json @@ -1,10 +1,10 @@ { - "setup": { - "download_url": "http://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.tar.gz", - "install_path": "bin", - "jar": "DynamoDBLocal.jar" - }, - "start": { - "port": 8000 - } + "setup": { + "download_url": "https://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.tar.gz", + "install_path": "./bin", + "jar": "DynamoDBLocal.jar" + }, + "start": { + "port": 8000 + } } diff --git a/dynamodb/installer.js b/dynamodb/installer.js index c2789c7..c51635d 100644 --- a/dynamodb/installer.js +++ b/dynamodb/installer.js @@ -1,29 +1,23 @@ "use strict"; -var tar = require("tar"), - zlib = require("zlib"), - path = require("path"), - http = require("http"), - fs = require("fs"), - ProgressBar = require("progress"), - utils = require("./utils"); +var tar = require('tar'), + zlib = require('zlib'), + path = require('path'), + https = require('https'), + fs = require('fs'), + ProgressBar = require('progress'), + utils = require('./utils'); -var download = function(downloadUrl, installPath, callback) { - console.log( - `Started downloading dynamodb-local from ${downloadUrl} into ${installPath}. Process may take few minutes.` - ); - http - .get(downloadUrl, function(response) { - var len = parseInt(response.headers["content-length"], 10), - bar = new ProgressBar( - "Downloading dynamodb-local [:bar] :percent :etas", - { - complete: "=", - incomplete: " ", - width: 40, - total: len - } - ); +var download = function (downloadUrl, installPath, callback) { + console.log("Started downloading Dynamodb-local. Process may take few minutes."); + https.get(downloadUrl, function (response) { + var len = parseInt(response.headers['content-length'], 10), + bar = new ProgressBar('Downloading dynamodb-local [:bar] :percent :etas', { + complete: '=', + incomplete: ' ', + width: 40, + total: len + }); if (200 != response.statusCode) { throw new Error(