title: What does the connect command do when using Mongoose (using it in a node.js environment)?
body: <p>I'm new to mongoose and am having trouble starting out. All I want to do is store some values, and retrieve all values. Right now, I'm just trying to get a base example working. Here's my code right now:</p>
  
  <pre><code>var mongoose = require('mongoose');
  var db = mongoose.connect('mongodb://localhost/my_database');
  
  var Schema = mongoose.Schema;
  
  var IPhoneDevice = new Schema({
      fbId  :  { type: String }
    , deviceToken   :  { type: String }
  });
  
  var IPhone = db.model('IPhone', IPhoneDevice);
  
  var u = new IPhone();
  u.fbId = 'John';
  u.save(function(){
      log.debug("Saving");
  });
  
  IPhone.find({}).all(function(array){
      log.debug("Finding stuff");
  });
  </code></pre>
  
  <p>The problem is, it never prints out anything. I think it might be something to do with the mongoose connect line. I just copied this from an example, but does there need to be a file on my localhost where the database is stored? I don't have any file called my_database anywhere...do I need to create one?</p>