title: NodeJS + MongoDB - Starting mongodb server instance installed from npm
body: <p>I'm running node.js on OSX and have just installed mongodb using command <code>npm install mongodb</code> under <code>myapp/node_modules</code> directory. According to mongodb official documenation, to start a mongodb you just have to execute <code>./mongodb/bin/mongo</code> on the command line. However I didn't see any directory called <code>'bin'</code> under the <code>node_modules/mongodb</code>..</p>
  
  <p>Is there a special way to start a mongodb instance when it were bundled together with a node.js app? How would I start a mongodb server running on <code>mongodb://localhost/myapp</code>?</p>
  
  <p>I'm currently also using matador (new mvc framework for node), and according to the documentation, we connect to the mongodb server this way:</p>
  
  <pre><code>// app/models/ApplicationModel.js
  module.exports = require('./BaseModel').extend(function () {
    this.mongo = require('mongodb') 
    this.mongoose = require('mongoose')
    this.Schema = this.mongoose.Schema
    this.mongoose.connect('mongodb://localhost/myapp') //CONNECT TO MONGODB SERVER...
  })
  </code></pre>
  
  <p>At this moment I dont think I have mongodb server running, and don't really know how to set it up because of the issue above. Would appreciate any links, answers, and pointers to the right direction. Thanks!</p>