March 2018
Intermediate to advanced
592 pages
13h 44m
English
Inside of Atom, what I'd like you to do is take the code all the way from db.collection down to the bottom of our callback, and comment it out. Then, we're going to go ahead and add something following it. Right previous db.close(), you're going to type Insert new doc into the Users collection. This doc is going to have a few properties. I want you to give it a name property; set that equal to your name. Then, we're going to give it an age property, and last but not least we can give it a location string. I want you to insert that doc using insertOne. You're going to need to pass in the new collection name into the collection method. Then, further down, you're going to add some error-handling code, and ...