From 9081c5f201396f722635848b3e13d1624c6a993e Mon Sep 17 00:00:00 2001 From: Jeff McAffer Date: Tue, 21 Feb 2017 18:34:31 -0800 Subject: [PATCH] clean up constructor args --- bin/cc | 2 +- lib/crawlerClient.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cc b/bin/cc index 62698d8..8a5bfdd 100644 --- a/bin/cc +++ b/bin/cc @@ -8,7 +8,7 @@ const readline = require('readline'); const split = require('argv-split'); const Q = require('q'); -const crawlerClient = new CrawlerClient(process.env.CRAWLER_SERVICE_URL || 'http://localhost:3000', process.env.CRAWLER_SERVICE_AUTH_TOKEN || 'secret'); +const crawlerClient = new CrawlerClient(); let promise = Q(); const commands = getCommands(); diff --git a/lib/crawlerClient.js b/lib/crawlerClient.js index 6b1819e..8e087f2 100644 --- a/lib/crawlerClient.js +++ b/lib/crawlerClient.js @@ -6,7 +6,7 @@ const Q = require('q'); class CrawlerClient { - constructor(url, token) { + constructor(url = null, token = null) { this.url = url || process.env.CRAWLER_SERVICE_URL || 'http://localhost:3000'; this.authToken = token || process.env.CRAWLER_SERVICE_AUTH_TOKEN || 'secret'; }