I'm trying to use the Dropbox Datastore API with NodeJS. I can connect and use it just fine, but I can't seem to get it to stop and let the program exit gracefully. I pulled the file from https://www.dropbox.com/static/api/1/dropbox-datastores-0.1.0-b3.js and put it in my local directory.
So if you run the following (with valid creds) then it never exits.
var dropbox = new require('./dropbox.js')
var client = new dropbox.Client
({
key:'apikey',
secret:'apisecret',
token:'useroauthtoken',
uid:'useruid'
});
var datastoreManager = client.getDatastoreManager();
datastoreManager.openDefaultDatastore(function(error,datastore){
if(error) console.log(error);
var table = datastore.getTable('exampletable');
table.insert({hello:'newman',inthepool:true});
});