SHARE

Yo ninjas, in this final MongoDB tutorial for beginners, I’ll show you how we can nest sub-documents.

—– COURSE LINKS:
+ Repo – https://github.com/iamshaunjp/mongodb-playlist
+ Atom editor – https://atom.io/a
+ Download GIT – https://git-scm.com/
+ CMDER – http://cmder.net/
+ MongoDB – https://www.mongodb.com/
+ Robomongo – https://robomongo.org/

JS Playlist – https://www.youtube.com/playlist?list=PL4cUxeGkcC9i9Ae2D9Ee1RvylH38dKuET

NODEJS Playlist – https://www.youtube.com/playlist?list=PL4cUxeGkcC9gcy9lrvMJ75z9maRw4byYp

ASYNC JS Playlist – https://www.youtube.com/playlist?list=PL4cUxeGkcC9jAhrjtZ9U93UMIhnCc44MH

———————————————————————————————
You can find more front-end development tutorials on CSS, HTML, JavaScript, jQuery, WordPress, Node.js & more on the channel homepage…

SUBSCRIBE TO CHANNEL – https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg?sub_confirmation=1

========== PSD to WordPress Playlist ==========

https://www.youtube.com/playlist?list=PL4cUxeGkcC9gnow7e45LQFkNVxwQ5BH-W

============ Node.js for Beginners Playlist =============

https://www.youtube.com/playlist?list=PL4cUxeGkcC9gcy9lrvMJ75z9maRw4byYp

============== The Net Ninja =====================

For more front-end development tutorials & to black-belt your coding skills, head over to – https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg or http://thenetninja.co.uk

================== Social Links ==================

Twitter – @TheNetNinja – https://twitter.com/thenetninjauk

32 COMMENTS

  1. Great tutorial. Had some issues with the beforeEach being on the connection.js test, but once I moved it dropping the table seemed to work. Also you need to add {useMongoClient: true} to the mongoose.connect function like so:

    mongoose.connect('mongodb://localhost/testaroo',{useMongoClient: true});

    Also after I run npm run test my console stays active and I have to Ctrl C to quit running the test.

  2. Great job! Have no clue about programming but the desire to learn it. Tried multiple sources (paid & for free)… I am clearly sticking to your channel the most.
    If I could, I would subscribe more than ones 🙂

  3. Where do the " describe; it; beforeEach " functions come from? Is it standard js, is it added in the node maschine or is it a npm package ?
    Still very glad I found you!

  4. Once again, thank you very very very much
    I love you, and I really really thank you, from the deep of my heart.
    your are true fullstack human-angel

  5. Great series. Thanks. One question. Is there a way to define the order in which the tests run? For example saving_test.js then updating_test.js then deleting_test.js.

  6. He used "result" when asserting the length of "books" the second time around, but "record" the first time. I just tried "record" for the second, more complicated "it" thingy and it didn't give me any problems. Is there a difference between using "record" and "result"?

  7. A newbie here. I don't get why in order to prevent multiple creation of 'author OBJ' with the same name and different book, u need to 'drop' the author after each test. In fact, aren't u losing essential data if each author is unique?

    Cant u just create a conditional where (if Author.name= existing_author.name, existing_author.books.push(bla bla) ) if u r looking to prevent duplication?

    Otherwise i learnt a lot about mongoose!

LEAVE A REPLY

Please enter your comment!
Please enter your name here