Last active
November 25, 2015 10:07
-
-
Save kBashar/f9908c11f3046ae67088 to your computer and use it in GitHub Desktop.
just a appbase test code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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