Access Meteor.js MongoDB?

I am new to Mongo and Meteor.

I installed Meteor on Mac OSX 10.8, and I created a new Meteor application using a collection called "Fillup".

I am learning some tutorials about Mongo, and I am trying to learn shell commands, but none of them work.

I want to use the Mongo command line to view and process the collection that I am building in my Meteor application.

I installed Mongo separately after Meteor, and I think that Meteor could use another “copy” of Mongo, because now when I try to “mongo” I get:

$ mongo MongoDB shell version: 2.4.5 connecting to: test Sun Jul 28 14:25:33.055 JavaScript execution failed: Error: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:L112 exception: connect failed 

Whether Meteor is working or not, and Meteor is working fine.

+4
source share
2 answers

Meteor uses different Mongo binaries to maintain a compatible version.

If you want to test your Mongo command commands or just play with it in the same version as Meteor, create a Meteor application and continue working:

 meteor create testapp cd testapp meteor 

And in another shell (or tab) run

 meteor mongo 

The reason it did not work in your case: you did not run the MongoDB mongod server mongod . But when you launch your Mongo application locally, it will start mongod with the correct set of flags and a separate database file.

+13
source

First try running mongod and then mongo .

To start MongoDB using all the default values, enter the following command in the shell:

mongod

This is for vanilla MongoDB, although you may be using a Meteor-specific flavor, as mentioned above.

http://docs.mongodb.org/manual/tutorial/manage-mongodb-processes/

+2
source

Source: https://habr.com/ru/post/1493958/