Skip to content

Instantly share code, notes, and snippets.

@patarkf
Created June 10, 2017 20:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patarkf/bdca5c8497960704ea3acf9cbe0387b2 to your computer and use it in GitHub Desktop.
Save patarkf/bdca5c8497960704ea3acf9cbe0387b2 to your computer and use it in GitHub Desktop.
const posts = [{}, {}, {}];
async function insertPosts(posts) {
posts.forEach(async post => {
const postId = await db.insert(post);
console.log(postId);
});
// Not finished here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment