Am getting this Missing "use strict" statement
even though it's decalred at the top of the file, which confuses me. This error appears twice, for lines 10 and 12.
'user strict';
var elasticsearch = require('elasticsearch');
var client = new elasticsearch.Client({
host : 'http://localhost:9200'
});
client.search({
index: 'twitter',
type: 'tweets'
}).then(function (resp) {
var hits = resp.hits.hits;
}, function (err) {
console.trace(err.message);
});
The code above is largely copy and paste from http://www.fullscale.co/elasticjs/