How to use the appbase-js.newClient function in appbase-js

To help you get started, we’ve selected a few appbase-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github appbaseio / dejavu / appbase-feed.js View on Github external
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",

appbase-js

Appbase.io streaming client lib for Javascript

MIT
Latest version published 1 year ago

Package Health Score

52 / 100
Full package analysis

Popular appbase-js functions