{"action":"created","issue":{"url":"https://api.github.com/repos/jo/couchdb-push/issues/26","labels_url":"https://api.github.com/repos/jo/couchdb-push/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/jo/couchdb-push/issues/26/comments","events_url":"https://api.github.com/repos/jo/couchdb-push/issues/26/events","html_url":"https://github.com/jo/couchdb-push/issues/26","id":119805788,"number":26,"title":"Beginner issue","user":{"login":"broerse","id":1432898,"avatar_url":"https://avatars.githubusercontent.com/u/1432898?v=3","gravatar_id":"","url":"https://api.github.com/users/broerse","html_url":"https://github.com/broerse","followers_url":"https://api.github.com/users/broerse/followers","following_url":"https://api.github.com/users/broerse/following{/other_user}","gists_url":"https://api.github.com/users/broerse/gists{/gist_id}","starred_url":"https://api.github.com/users/broerse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broerse/subscriptions","organizations_url":"https://api.github.com/users/broerse/orgs","repos_url":"https://api.github.com/users/broerse/repos","events_url":"https://api.github.com/users/broerse/events{/privacy}","received_events_url":"https://api.github.com/users/broerse/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-01T20:55:01Z","updated_at":"2015-12-01T21:06:43Z","closed_at":null,"body":"Hi,\r\n\r\nI like to use your module for my ember-cli-deploy-couchdb and it works on my localhost but I have some async issue. In\r\n\r\nhttps://github.com/broerse/ember-cli-deploy-couchdb/blob/master/index.js\r\n\r\nthe couchapp is never upload to cloudant because the deploy does not wait for the push. The this.log is never printed. On localhost it is faster and than it works.\r\n\r\nHow do I wait? I am new to nodejs so I hope you can give me some pointers."},"comment":{"url":"https://api.github.com/repos/jo/couchdb-push/issues/comments/161095789","html_url":"https://github.com/jo/couchdb-push/issues/26#issuecomment-161095789","issue_url":"https://api.github.com/repos/jo/couchdb-push/issues/26","id":161095789,"user":{"login":"jo","id":17586,"avatar_url":"https://avatars.githubusercontent.com/u/17586?v=3","gravatar_id":"","url":"https://api.github.com/users/jo","html_url":"https://github.com/jo","followers_url":"https://api.github.com/users/jo/followers","following_url":"https://api.github.com/users/jo/following{/other_user}","gists_url":"https://api.github.com/users/jo/gists{/gist_id}","starred_url":"https://api.github.com/users/jo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jo/subscriptions","organizations_url":"https://api.github.com/users/jo/orgs","repos_url":"https://api.github.com/users/jo/repos","events_url":"https://api.github.com/users/jo/events{/privacy}","received_events_url":"https://api.github.com/users/jo/received_events","type":"User","site_admin":false},"created_at":"2015-12-01T21:06:43Z","updated_at":"2015-12-01T21:06:43Z","body":"Hi @broerse, welcome to nodejs!\r\n\r\nYou can use [async](https://github.com/caolan/async), which \r\n\r\n> provides straight-forward, powerful functions for working with asynchronous JavaScript.\r\n\r\nWith [`async.each()`](https://github.com/caolan/async#each) (to handle the upload in paralell) or `async.eachSeries()` (to push one file after the other) `callback` is called when all files have been processed:\r\n\r\n```diff\r\n- distFiles.forEach(function (item) {\r\n+ async.eachSeries(distFiles, function (item) {\r\n//\r\n+}, callback)\r\n```"}}