i am able to run mongodb in my apple console, and vim the mongo.log
right now, i just want to open up the mongodb console so that i can test queries in the console just like the examples in http://www.mongodb.org/display/DOCS/Tutorial
at the moment, the cursor is not returned:
> mongodb
all output going to :/usr/local/var/log/mongodb/mongo.log
and the cursor is not returned. i was expecting the cursor to be returned to so i can do the following :
> mongodb
all output going to :/usr/local/var/log/mongodb/mongo.log
> test = {name : "bouncingHippo"}
> db.family.save(test)
> "ok"
What am i doing wrong? i am using mongoose
I’m not entirely clear which console you are getting this output from, as the Node console won’t return anything usable if you just enter
mongodb.If what you are trying to do is just launch a MongoDB console, you will need to first launch the
mongodprocess and then attach to that process with the MongoDB console. The MongoDB console is calledmongo. In the simplest test, you can launchmongodfrom one terminal window and thenmongofrom another. In the terminal window that is runningmongoyou can then work through the examples in the tutorial. Your pseudo code would then look like:If you are trying to use Mongoose for the pseudo code you have in your question, it would be more like the following from the Node console (assuming Node.js and Mongoose are installed)