Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var elasticsearch = require('elasticsearch')
var esTypes = [];
// app and authentication configurations
const HOSTNAME = "scalr.api.appbase.io"
const APPNAME = "createnewtestapp01"
const USERNAME = "RIvfxo1u1"
const PASSWORD = "dee8ee52-8b75-4b5b-be4f-9df3c364f59f"
// elasticsearch client. we use it for indexing, mappings, search settings, etc.
var client = new elasticsearch.Client({
host: 'https://'+USERNAME+":"+PASSWORD+"@"+HOSTNAME,
});
var streamingClient = appbase.newClient({
url: 'https://'+HOSTNAME,
appname: APPNAME,
username: USERNAME,
password: PASSWORD
});
streamingData = [];
function init(){
var client = new elasticsearch.Client({
host: 'https://'+USERNAME+":"+PASSWORD+"@"+HOSTNAME,
apiVersion: '1.6'
});
client.index({
index: APPNAME,
type: "tweet",