

CONNECT MONGODB COMPASS TO LOCALHOST HOW TO
I my mind I knew how to setup a local MongoDB database would be quite simple yet for some reason it simply wasn’t as straightforward as I thought. Now, I hadn’t worked with this combination (NodeJS + MongoDB) before, I came across a few hurdles when setting up a local MongoDB instance. It’s difficult for me to find the time to do that at work, so I am doing this after hours. All those solutions fixed the issues assigned to me but I felt I should have my own MongoDB and NodeJS playground to understand the basics of it.
CONNECT MONGODB COMPASS TO LOCALHOST CODE
As a result, I have written heaps (lots) of code and solved number of problems over the last 4 months. The focus is heavily on building fast and shipping things. Now, my workplace can be a little fast paced, in that every request is a priority, it has to be done ASAP. I started working with this tech at my workplace on a new project. I cannot say either of these technologies are entirely new to me, I have built a backend with Node before and I have worked with a NoSQL database before. good times 🙂Īnyway, fast forward 10 years and I now find myself working on a “modern backend” which includes NodeJS and MongoDB. Ahh… I fondly remember the days of finding that mysql connector jar file, adding it as a dependency to my Dynamic Web project in Eclipse IDE and then the JDBC connector…. A lot of my experience has been around relational databases, be it MySQL, SQL Server, Oracle or PostgreSQL. I am of course talking about a time before Spring initializr made life easy. I am an old timer, I have been around since the days when Java or J2EE would take a couple of days to just setup. In this post, I will talk about how to setup a local instance of MongoDB, run it, insert data into it via the Mongo shell, view it using a GUI like MongoDB Compass and connect it to a NodeJS backend. On starting with MongoDB, I found that setting up and connecting to a local MongoDB database wasn’t very straightforward. Prior to this, I have worked with various relational databases and a NoSQL database that wasn’t MongoDB. This was one of the first times I worked so heavily with MongoDB database. Hence, I have a connection url to connect to the MongoDB instance and I can connect to it without any dramas. For the purpose of the project, I am mostly working with a MongoDB instance stored somewhere on the cloud. Mostly, REST APIs and the database backend for which we use MongoDB. The most recent project at my work is all about building APIs. I have spent a lot of time working with MongoDB and NodeJS lately.
