title: how to connect MongoDB in Cloud9?
body: <p>I have a problem with the connection database MongoDB in Cloud9
  Please help to resolve this issue!</p>
  
  <pre><code>var MongoClient = require("mongodb").MongoClient;
  var port = process.env.PORT;
  var ip   = process.env.IP;
  MongoClient.connect("mongodb://"+ip+":"+port+"/test",function(error,db){
          if(!error){
           console.log("We are connected");   
          }
          else{
           console.dir(error); //failed to connect to [127.4.68.129:8080]               
          }
  });
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Running Node Process
  Your code is running at 'http://demo-project.alfared1991.c9.io'.
  Important: use 'process.env.PORT' as the port and 'process.env.IP' as the host in your scripts!
  [Error: failed to connect to [127.4.68.129:8080]]
  </code></pre>