MongoDB Developer
JavaScript
plus
Sign in to follow topics
MongoDB Developer Centerchevron-right
Developer Topicschevron-right
Languageschevron-right
JavaScriptchevron-right

MongoDB & Node.js: Create an ACID Transaction (Part 3 of 4)

Published May 14, 2021
JavaScript
Facebook Icontwitter iconlinkedin icon
Rate this video
star-empty
star-empty
star-empty
star-empty
star-empty
✅ Sign-up for a free cluster at: https://mdb.link/free-bdS03tgD2QQ ✅ Get help on our Community Forums: https://mdb.link/community-bdS03tgD2QQ In part three of this quick start tutorial for developers, Lauren Schaefer explains how to create ACID (atomicity, consistency, isolation, durability) transactions for MongoDB in a Node.js script. She explains how to use withTransaction() and a session to successfully complete or abort a transaction. Chapters: 00:00 Intro 01:06 ACID transactions in MongoDB 04:06 The Setup 05:19 Create a Transaction 05:43 Create a Helper Function 07:50 Create a Function for the Transaction 17:59 Call the Function 20:54 Wrapping Up Other videos in this tutorial series: Part 1: https://youtu.be/fbYExfeFsI0 Part 2: https://youtu.be/iz37fDe1XoM Links Lauren mentions in the video: Lauren's blog post: How to Use MongoDB Transactions in Node.js https://developer.mongodb.com/quickstart/node-transactions Lauren's GitHub repo with the code from this video https://github.com/mongodb-developer/nodejs-quickstart/blob/master/transaction.js Lauren's script to create a "users" collection https://github.com/mongodb-developer/nodejs-quickstart/blob/master/usersCollection.js Node.js & MongoDB Starter Template File https://github.com/mongodb-developer/nodejs-quickstart/blob/master/template.js MongoDB Documentation: Convert a Standalone to a Replica Set https://docs.mongodb.com/manual/tutorial/convert-standalone-to-replica-set Connect with Lauren: Twitter: https://twitter.com/lauren_schaefer​ TikTok: https://tiktok.com/@lauren_schaefer​ Linkedin: https://www.linkedin.com/in/laurenjan...​ MongoDB Community: https://developer.mongodb.com/community/forums/t/hey-friends-im-lauren/168/ Subscribe to MongoDB ►►► https://bit.ly/3bpg1Z1 Connect with MongoDB: Website: https://bit.ly/2LjtNBZ Twitter: https://bit.ly/3fH87gR Facebook: https://bit.ly/3fEaIsd Linkedin: https://bit.ly/2SY9w90 Instagram: https://bit.ly/3bn9bDv Community Forums: https://bit.ly/2I8VCi5 TikTok: https://bit.ly/3fHoqdJ
All MongoDB Videos

Facebook Icontwitter iconlinkedin icon
Rate this video
star-empty
star-empty
star-empty
star-empty
star-empty
Related
Tutorial

How to Write Unit Tests for MongoDB Atlas Functions


Sep 23, 2022
Tutorial

Add a Comments Section to an Eleventy Website with MongoDB and Netlify


Feb 03, 2023
Code Example

Blogue


Jul 07, 2022
Tutorial

OAuth & MongoDB Realm Serverless Functions


Sep 23, 2022