So I installed mongoDB and installed mongoose properly from the terminal on the IDE Cloud 9. But when I run this code
var express = require('express');
var bodyparser = require('body-parser');
var mongoose = require('mongoose');
var configDB = require('./database.js');
var mongoURI = 'mongodb://' + process.env.IP;
//Prints out "mongodb://0.0.0.0"
console.log(mongoURI);
mongoose.connect(mongoURI);
It ends up getting this error:
events.js:163
throw er; // Unhandled 'error' event
^
MongoError: failed to connect to server [0.0.0.0:27017] on first connect
[MongoError: connect ECONNREFUSED 0.0.0.0:27017]
And I couldn't find a solution for people using C9 so I was wondering what I need to do to fix this problem. Thank you.