From 131badd06f234ee74bd907d0877cc141db105c9f Mon Sep 17 00:00:00 2001 From: alexanderbeletsky Date: Mon, 14 Jul 2014 14:18:56 +0300 Subject: [PATCH] core corrections --- bin/elaster | 2 ++ config/index.js | 9 ++++++--- source/elastic/index.js | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/bin/elaster b/bin/elaster index 6bb5aa3..16adfa2 100755 --- a/bin/elaster +++ b/bin/elaster @@ -2,4 +2,6 @@ var elaster = require('../source/elaster'); var config = require('../config'); +//process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; + elaster.run(config.collections); diff --git a/config/index.js b/config/index.js index 1fe0cc9..5a87e74 100644 --- a/config/index.js +++ b/config/index.js @@ -5,14 +5,17 @@ module.exports = { elastic: { host: { - host: 'https://search.likeastore.com', - port: 80, + protocol: 'https', + host: 'search.likeastore.com', + port: 443, query: { access_token: '63882eb552185b755a954c9c3c9deba282b20588' } }, - requestTimeout: 5000 + requestTimeout: 5000, + + rejectUnauthorized: false }, collections: [ { diff --git a/source/elastic/index.js b/source/elastic/index.js index 53c15da..2ea3e8f 100644 --- a/source/elastic/index.js +++ b/source/elastic/index.js @@ -1,7 +1,7 @@ var elasticsearch = require('elasticsearch'); module.exports = function (config) { - var client = elasticsearch.Client(config.elasticsearch); + var client = elasticsearch.Client(config.elastic); return client; }; \ No newline at end of file