MongoDB Getting Started

To install mongodb on windows: https://code.msdn.microsoft.com/Mongo-Database-setup-on-6963f46f

Steps:
1) download the windows installer from mongodb.
2) install the msi file.
3) setup the path environment variable to the bin directory of the installation of mongodb.
4) run the command:

mongod --dbpath PATH_TO_DIRECTORY_WHERE_YOU_WANT_DB

Mongodb server will start waiting for a connection.
5) Now in an another cmd prompt:

mongo
db.test.save({ a: 1 })
db.test.find()

Now we have inserted values in the db.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s