Bitnami Meanstack Mongoose Connection
<p>I created a simple service in Ubuntu 16.04 with mongo db node and express to return data to an angular 2 app.</p>

<p>I have a file called server.js that connects to a local mongodb instance with a database called game and a collection called players. It works fine installed on my local machine. However I am trying to deploy it with Bitnami's mean stack image on amazon ec2. (bleh mouth full). I have set ports correctly according to <a href="https://scotch.io/tutorials/deploying-a-mean-app-to-amazon-ec2-part-2" rel="nofollow noreferrer">this guide</a>, and I can connect to it remotely. However, I can't get mongoose to connect to any database. here is my code that works on my local machine.</p>

<pre><code>mongoose.connect('mongodb://localhost:27017/game');

router.route('/player')



.get(function(req, res) {
    console.log(mongoose.connection.readyState);
    Player.find({"player":user,"password":password},function(err, Test) {
        if (err)
            res.send(err);

        res.json(Test);
    });
});
</code></pre>

<p>And here is my adjusted code for the mean stack image</p>

<pre><code>mongoose.connect('mongodb://root:"My-Root-Password@127.0.0.1:27017/game');
 router.route('/player')
.get(function(req, res) {

console.log(mongoose.connection.readyState);
    Player.find({"player":user,"password":password},function(err, Test) {
        if (err)
            res.send(err);

        res.json(Test);
    });
});
</code></pre>

<p>On my local machine I get a value of 1 on the console.log and value of zero on the mean stack image. I'm not sure how to connect to bitnami's mongo instance with mongoose. I have checked that game exist and has the data I want. </p>