Reputation: 15
I am trying to connect to my AWS Bitnami MEAN instance. The code has been uploaded on the server. But on connecting to it, I am getting the following error :
I have been following the steps given at : https://scotch.io/tutorials/deploying-a-mean-app-to-amazon-ec2-part-1 to connect to the instance. In the second aprt of it, where they are making changes for mongoDB, I did all those, but since then, I am getting this error.
Upvotes: 0
Views: 150
Reputation: 86
Your connection is being refused, it seems like an authentication error. You must provide the password in your application, i.e. if you are using Mongoose in order to connect:
var Mongoose = require('mongoose');
var db = Mongoose.createConnection('mongodb://*USER:PASSWORD*@localhost/*DATABASE*');
You must use your correct mongodb socket and your correct password and database name.
Best regards, Silvio Fernández
Upvotes: 1