title: Mongoose - database not showing up on GUI despite establishing connection
body: <p>I'm writing a bare-bones express app from scratch. I have established a db connection using mongoose. What I'm trying to achieve now is just simply make the db show up on the mongo GUI (I'm using both mongo compass and Robo 3T). Here's my <code>server.js</code>:</p>
  
  <pre><code>import express from 'express'
  import mongoose from 'mongoose'
  
  require('dotenv').config()
  
  const server = express()
  
  server.get('/', (req, res) =&gt; {
      res.send("Hello World");
  });
  
  const port = process.env.PORT || 5000;
  
  mongoose.connect(process.env.DB_URL, { useNewUrlParser: true });
  
  mongoose.connection.on('open', function(){
      console.log("Mongoose default connection is open to ", process.env.DB_URL)
  });
  
  
  server.listen(port, () =&gt; {
      console.log(`server running on port ${port}`)
  });
  </code></pre>
  
  <p>The <code>DB_URL</code> looks like this: <code>DB_URL=mongodb://localhost:27017/my-test-db</code></p>
  
  <p>Just as expected, I'm getting the output saying - <code>Mongoose default connection is open to  mongodb://localhost:27017/root-factory-db</code>. However, the database never shows up on the GUI when I connect to <code>localhost:27017</code>. I understand that it doesn't have any data. So I searched further to at least see if it lists the db after the connection. For that I tried adjusting the <code>connection.on</code> method as follows:</p>
  
  <pre><code>mongoose.connection.on('open', function(){
      console.log("Mongoose default connection is open to ", process.env.DB_URL)
      new Admin(mongoose.connection.db).listDatabases(function(err, result) {
          console.log('listDatabases succeeded');
          // database list stored in result.databases
          var allDatabases = result.databases;
          console.log('allDatabases: ', allDatabases)
      });
  });
  </code></pre>
  
  <p>Upon doing this, I can see all my other databases from my other local apps, except the <code>my-test-db</code> I just created. Is it not showing up either on GUI/programmatically because it's empty? Last time I tried on both the GUI's (Robo 3T and Mongo Compass), they showed empty databases just fine. Can someone please point me to the right direction here?</p>
  
  <p>EDIT: Also trying <code>show dbs</code> from the mongo terminal. The db doesn't show up on that either.</p>