marcwan / LearningNodeJS

Source code to accompany my book, "Learning Node.JS"
280 stars 245 forks source link

Update function used to create collections #29

Open DundieWinner opened 7 years ago

DundieWinner commented 7 years ago

The collections() function was tripping an error each time I called it with the purpose of creating a collection. Replacing it with the createCollection() function solves the issue.

DundieWinner commented 7 years ago

This answers https://github.com/marcwan/LearningNodeJS/issues/28

marcwan commented 7 years ago

Hi @javajared !!

So, I looked through this today, and the code works fine as is — it does, however, use the mongodb: "2.x" module instead of the newer 3.x module.

How exactly are you seeing this problem?