AppbaseJS
JavaScript library for Appbase Appbase.io Current Version: 2.2.17
Get Appbase
Node: npm install appbasejs
Browser: https://cdn.appbase.io/2.0/appbase.js
Dev
Do npm install
inside the folder to install devDependencies.
Browser Build
Distribution build
npm run-script build
: creates ./dist/appbase.min.js
Test build
npm run-script test_build
: creates ./build/appbase.js this build exposes internal server methods, and allows running tests on them in the browser.
Testing
npm test
for node.
Goto /test/browser/index.html for browser tests. If there's a test build, it will also run tests on internal server methods as well, otherwise will run tests only on interface methods.
Play
Node:
Appbase = ;
Browser:
Put Credentials
Appbase;
Appbase references
Now let's create two Appbase references under namespaces "user" and "tweets".
var userRef = Appbase;var tweetRef = Appbase;
As seen here, one can optionally specify the reference name.
Working with Data
userRef;tweetRef;
Now let's add the tweet as an edge to our user reference.
userRef;
Go real-time!
Listen to the changes on the user reference data properties and edges, to see the changes we have made so far.
userRef;userRef;
Full-text search
Appbase