node.js - Closing out Dropbox Datastore API in NodeJS -


i'm trying use dropbox datastore api nodejs. can connect , use fine, can't seem stop , let program exit gracefully. pulled file https://www.dropbox.com/static/api/1/dropbox-datastores-0.1.0-b3.js , put in local directory.

so if run following (with valid creds) 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}); }); 

have tried process.exit() (see http://nodejs.org/api/process.html#process_process_exit_code)?

this should shutdown program gracefully.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -