Skip to content
This repository
tag: 3.0.2
Fetching contributors…

Cannot retrieve contributors at this time

file 238 lines (234 sloc) 12.114 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>Mongoose ODM v3.0.1</title><link href="http://fonts.googleapis.com/css?family=Anonymous+Pro:400,700|Droid+Sans+Mono|Open+Sans:400,700|Linden+Hill|Quattrocento:400,700|News+Cycle:400,700|Antic+Slab|Cabin+Condensed:400,700" rel="stylesheet" type="text/css"><link href="/docs/css/default.css" rel="stylesheet" type="text/css"><style>body {
  background: #d8e2d8 url(/docs/images/square_bg.png); /* #D8E2D8 #B5F66E; /* #CEF6A4; */
  font-family: 'Open Sans', Helvetica, Arial, FreeSans;
  color: #333;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  padding: 0;
  margin: 0;
}
a {
  color: #800;
  -webkit-transition-property: opacity, -webkit-transform, color, background-color, padding, -webkit-box-shadow;
  -webkit-transition-duration: 0.15s;
  -webkit-transition-timing-function: ease-out;
}
a:hover {
  opacity: 0.8;
}
#wrap {
  width: 600px;
  margin: 0 auto;
  position:relative;
}
li {
  list-style: square;
}
h1 {
  font-family: 'Helvetica Nueue', Helvetica, Arial, FreeSans, sans-serif;
  text-rendering: geometricPrecision;
}
pre {
  background: rgba(255,255,255,.8);
  border: 1px solid #bbb;
  padding:5px;
  border-radius: 3px;
  box-shadow: 1px 3px 6px #ddd;
}
code {
  background: rgba(255,255,255,.8);
  border: 1px solid #c6c6c6;
  color: #333;
  border-radius: 3px;
  font-size: 13px;
  font-family: Monaco;
}
pre code {
  border: 0 none;
  padding: 1.2em;
  overflow-x: auto;
}
#header {
  text-align: center;
  padding-top: 40px;
}
#header, h2, h3, .tagline, .blurb {
  text-transform: lowercase;
}
#header h1 {
  margin-top: 0;
  margin-bottom: 0;
}
#header h1 a {
  text-decoration: none;
}
#header .mongoose {
  font-size: 146px;
  font-weight: 100;
  text-indent: -23px;
  color: #fff;
  text-shadow: 47px 5px 4px transparent, -6px 0 9px transparent;
  /*-webkit-transition: text-shadow 2s ease-in-out;*/
  /*-moz-transition: text-shadow 2s ease-in-out;*/
}
.load #header .mongoose {
  text-shadow: 18px 5px 6px #777, -6px 0px 2px #fff;
  letter-spacing: -14px;
}
.tagline {
  color: #800;
  font-size: 25px;
  text-shadow: 1px 1px #f8f8f8;
  text-align: center;
}
.blurb {
    text-align: center;
}
.tagline a, .blurb a {
  text-decoration: none;
  color: #800;
}
#links {
  margin: 30px 10px 46px;
  text-align: center;
  position: relative;
}
#links ul {
  margin: 0;
  padding: 0;
}
#links li {
  display: inline-block;
  padding: 11px 3px;
  border-radius: 5px;
  border: 1px solid #bbb;
  margin: 0 15px;
  background-color: #fefefe;
}
#links a {
  background: #444;
  padding: 9px 67px;
  border-radius: 3px;
  color: #fff;
  text-decoration: none;
  text-transform: lowercase;
  text-shadow: 1px 1px 7px #222;
}
#production ul {
  padding: 0;
}
#production li {
  float: left;
  list-style: none;
  overflow: hidden;
  height: 133px;
}
#production img {
  width: 200px;
}
#production a {
  -webkit-transition-property: opacity;
  -moz-transition-property: opacity;
  -o-transition-property: opacity;
  transition-property: opacity;
  -webkit-transition-duration: 0.25s;
  -moz-transition-duration: 0.25s;
  -o-transition-duration: 0.25s;
  transition-duration: 0.25s;
  opacity: 0.7;
}
#production a:hover {
  opacity: 1.0;
  
}
.addyourown {
  width: 200px;
  height: 134px;
  text-align: center;
}
.addyourown a {
  display: block;
  width: 200px;
  height: 134px;
  padding: 53px 0 0;
  background-color: #F2F7ED;
  background-color: #fff;
}
@media only screen and (max-width: 480px) {
  #forkbanner { display: none }
  #header {
    padding-top: 12px;
  }
  #header .mongoose {
    text-align: center;
    font-size: 65px;
    font-weight: 100;
    color: #fff;
    text-shadow: 6px 4px 5px #777, -2px 0px 2px white;
    letter-spacing: -7px;
  }
  .load #header .mongoose {
    text-shadow: 6px 4px 5px #777, -2px 0px 2px white;
    letter-spacing: -7px;
  }
  .tagline {
    text-align: center;
    font-size: 14px;
  }
  .tagline a {
    text-decoration: none;
  }
  .blurb {
    font-size: 16px;
    text-align: justify;
    margin-top: 25px;
  }
  #links {
    margin-bottom: 40px;
  }
  #links li {
    padding: 8px 2px;
    margin: 0 12px;
  }
  #links a {
    background: #444;
    padding: 7px 34px;
    font-size: 15px;
  }
  #docs { margin-left: 0; }
  .module {
    padding-left: 5px;
    border-width: 3px;
  }
  #wrap {
    width: auto;
    padding: 0 5px;
  }
  #production li {
    margin-bottom: 8px;
  }
  #production a {
    opacity: 1;
  }
  #production img {
    width: 100%;
  }
  .addyourown, .addyourown a {
    width: 100%;
  }
}
</style></head><body><a id="forkbanner" href="http://github.com/learnboost/mongoose"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub"></a><div id="wrap"><div id="header"><h1><a href="https://github.com/learnboost/mongoose" target="blank"><div class="mongoose">Mongoose</div></a></h1></div><p class="tagline">Elegant <a href="http://www.mongodb.org/" target="blank">MongoDB</a> object modeling for <a href="http://nodejs.org/" target="blank">Node.js</a></p><div id="links"><ul><li><a href="docs/guide.html">Docs</a></li><li><a href="http://plugins.mongoosejs.com">Plugins</a></li></ul></div><p class="blurb"><a href="docs/middleware.html">Flexible</a>, <a href="docs/guide.html">schema based</a> and <a href="docs/queries.html">feature-rich</a>, mongoose solves common problems for <a href="#production">real-world</a> applications.</p><div id="example"><pre><code class="javascript"><span class="keyword">var</span> mongoose = require(<span class="string">'mongoose'</span>);
<span class="keyword">var</span> db = mongoose.createConnection(<span class="string">'localhost'</span>, <span class="string">'test'</span>);

<span class="keyword">var</span> schema = mongoose.Schema({ name: <span class="string">'string'</span> });
<span class="keyword">var</span> Cat = db.model(<span class="string">'Cat'</span>, schema);

<span class="keyword">var</span> kitty = <span class="keyword">new</span> Cat({ name: <span class="string">'Zildjian'</span> });
kitty.save(<span class="function"><span class="keyword">function</span> <span class="params">(err)</span> {</span>
  <span class="keyword">if</span> (err) <span class="comment">// ...</span>
  res.end(<span class="string">'meow'</span>);
});</code></pre></div><div id="install"><h2>Installation</h2><pre><code class="bash">$ npm install mongoose</code></pre></div><div id="getstarted"><h2>Getting Started</h2><ul><li><a href="docs/index.html">quick start guide</a></li></ul></div><div id="support"><h2>Support</h2><ul><li>irc: #mongoosejs on freenode</li><li><a href="http://groups.google.com/group/mongoose-orm">google group</a></li><li><a href="https://github.com/learnboost/mongoose/issues/">bug reports</a></li><li><a href="http://www.mongodb.org/display/DOCS/Technical+Support">10gen</a></li></ul></div><div id="production"><h2>Production</h2><ul><li><a href="https://www.learnboost.com" title="LearnBoost is a free online gradebook, lesson planner, attendance, and reporting application for Teachers, Parents, and Students."><img src="/docs/images/apps/learnboost.png" alt="LearnBoost is a free online gradebook, lesson planner, attendance, and reporting application for Teachers, Parents, and Students."></a></li><li><a href="http://storify.com/" title="Storify lets you curate social networks to build social stories, bringing together media scattered across the Web into a coherent narrative."><img src="/docs/images/apps/storify.png" alt="Storify lets you curate social networks to build social stories, bringing together media scattered across the Web into a coherent narrative."></a></li><li><a href="https://clickdummy.com" title="ClickDummy is a rapid mockup prototyping application for designers and dummies."><img src="/docs/images/apps/clickdummy.png" alt="ClickDummy is a rapid mockup prototyping application for designers and dummies."></a></li><li><a href="http://scottyapp.com" title="Scotty App allows you to create data driven backends for your apps in minutes instead of weeks."><img src="/docs/images/apps/scottyapp.png" alt="Scotty App allows you to create data driven backends for your apps in minutes instead of weeks."></a></li><li><a href="http://geekli.st" title="Geeklist is an achievement-based social portfolio builder where all bad-ass code monkeys around the globe can communicate, brag, build their street cred and get found."><img src="/docs/images/apps/geeklist.png" alt="Geeklist is an achievement-based social portfolio builder where all bad-ass code monkeys around the globe can communicate, brag, build their street cred and get found."></a></li><li><a href="https://bozuko.com" title="Bozuko is an exciting customer rewards program."><img src="/docs/images/apps/bozuko.png" alt="Bozuko is an exciting customer rewards program."></a></li><li><a href="http://calllistapp.com" title="Call List helps you maintain a todo list for people you need to call."><img src="/docs/images/apps/calllist.png" alt="Call List helps you maintain a todo list for people you need to call."></a></li><li><a href="http://www.gtggolf.com" title="Grow The Game Golf lets you think, act, and score your golf game like a pro with real-time scoring, live leaderboards and more."><img src="/docs/images/apps/growthegamegolf.png" alt="Grow The Game Golf lets you think, act, and score your golf game like a pro with real-time scoring, live leaderboards and more."></a></li><li><a href="http://nextdays.com/" title="nextdays lets you share plans with friends and discover what is happening around you."><img src="/docs/images/apps/nextdays.png" alt="nextdays lets you share plans with friends and discover what is happening around you."></a></li><li><a href="http://linkr.cc" title="Linkr is a service for saving links for reading later."><img src="/docs/images/apps/linkr.png" alt="Linkr is a service for saving links for reading later."></a></li><li><a href="http://www.attictv.com/" title="AtticTV is Music Television (MTV) for the web."><img src="/docs/images/apps/attictv.png" alt="AtticTV is Music Television (MTV) for the web."></a></li><li><a href="https://localresponse.com" title="LocalResponse helps marketers respond to real-time consumer intent."><img src="/docs/images/apps/localresponse.png" alt="LocalResponse helps marketers respond to real-time consumer intent."></a></li><li><a href="http://selectvids.com" title="Select Vids is a collection of amazing, funny, and creative videos for you to discover."><img src="/docs/images/apps/selectvids.png" alt="Select Vids is a collection of amazing, funny, and creative videos for you to discover."></a></li><li><a href="https://cldfy.com/" title="cldfy delivers mail to your app."><img src="/docs/images/apps/cldfy.png" alt="cldfy delivers mail to your app."></a></li><li><a href="http://www.sharelatex.com" title="ShareLatex is a real-time LaTeX collaboration tool."><img src="/docs/images/apps/sharelatex.png" alt="ShareLatex is a real-time LaTeX collaboration tool."></a></li><li><a href="http://apps.newleafdigital.com/lists" title="Lists is a service for saving links for reading later."><img src="/docs/images/apps/lists.png" alt="Lists is a service for saving links for reading later."></a></li><li class="addyourown"><a href="mailto:aaronheckmann+github@gmail.com?subject=Please add my project to mongoosejs.com" title="add/remove your project">add your project</a></li></ul></div></div><script>document.body.className = 'load';</script><script>var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-1122274-9']);
_gaq.push(['_trackPageview']);

(function() {
  var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();</script></body></html>
Something went wrong with that request. Please try again.