I new to Mongodb, I tried to find good tutorials but no luck.
2 question:
I have mongo install with data and I want to connect it with js file and play with it I created a.js file and my firs two line were:
conn = new mongo();db = conn.getDB("table1");
and I get error ReferenceError: mongo is not defined at a.js
- any good tutorials ?
db.getSiblingDb('table1')and the second question is one left to Googlemongoobject. That should instead beconn = new Mongo()(proper case). For more information on how to write scripts see: Write Scripts for the mongo Shell in the MongoDB manual.mongoshell, note that this is not intended as a full application programming environment. For example, you will have limited control over input & output. If you are just getting started with MongoDB you will probably find it easier to start with one of the supported language drivers (many include tutorials, too). The free online courses at MongoDB University are also a great start.