I am new to node.js and mongodb. In my database, I have several collections (one for users, one for an article, and in the future one more ...).
In my server.js file, I would like to be able to write in each of these collections. Here is the code I use, but I cannot access all my collections. Do you have any ideas to make this possible?
var databaseUrl = "mydb"; // "username: password@example.com /mydb" var collections = ["users", "article", "reports", "archery"] var db = require("mongojs").connect(databaseUrl, collections);
thanks
source share