title: Mongo shell does not show collections (command show collections) when insert through Node JS
body: <p><a href="http://i.stack.imgur.com/3bAJm.png" rel="noreferrer">This is my project <code>url-shortener</code> directory</a></p>
  
  <p>I have a Node JS app that involves using MongoDB. It works fine, as I tried inserting, finding, and printing data from MongoDB to the console in the Node JS file, server.js. However, if I open a Mongo Shell and type <code>show collections</code>, it would show nothing. </p>
  
  <p>Here is how I establish MongoDB connection:</p>
  
  <p><code>mongod --dbpath ...path-to-project/url-shortener/data</code>,</p>
  
  <p>Here is the url I use to connect in my <code>server.js</code> file:</p>
  
  <p><code>var dbUrl = "mongodb://localhost:27017/url-shortener";</code></p>