Skip to content

Instantly share code, notes, and snippets.

@kBashar
Last active November 25, 2015 10:07
Show Gist options
  • Save kBashar/f9908c11f3046ae67088 to your computer and use it in GitHub Desktop.
Save kBashar/f9908c11f3046ae67088 to your computer and use it in GitHub Desktop.
just a appbase test code
var Appbase = require('appbase-js')
var appbaseRef =new Appbase({
url: 'https://*********:********[email protected]',
appname: 'kbasharfirstapp'
})
var jsonObject = {
"department_name":"Books",
"department_name_analyzed":"Books",
"department_id":1,
"name":"A Fake Book on Network Routing",
"price":5595
}
appbaseRef.index({
type: 'books',
id: 'X1',
body: jsonObject
}).on('complete', function(response) {
console.log(response);
}).on('error', function(error) {
console.log(error);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment