Permalink
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (16 sloc) 5.49 KB
<!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.6.17</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"><link href="docs/css/style.css" rel="stylesheet"></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" class="homepage"><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">Read the Docs</a></li><li><a href="http://plugins.mongoosejs.com">Discover Plugins</a></li></ul></div><div id="follow"><ul><li><iframe src="http://ghbtns.com/github-btn.html?user=learnboost&amp;repo=mongoose&amp;type=watch&amp;count=true" allowtransparency="true" frameborder="0" scrolling="0" width="100px" height="20px" class="github-btn"></iframe></li><li id="version"><span>Version 3.6.17</span></li><li><iframe src="http://ghbtns.com/github-btn.html?user=learnboost&amp;repo=mongoose&amp;type=fork&amp;count=true" allowtransparency="true" frameborder="0" scrolling="0" width="100px" height="20px" class="github-btn"></iframe></li></ul></div><div id="inner"><div id="what"><p class="what">Let's face it, <strong>writing MongoDB validation, casting and business logic boilerplate is a drag</strong>. That's why we wrote Mongoose. </p></div><div id="example"><pre><code class="javascript"><span class="keyword">var</span> mongoose = require(<span class="string">'mongoose'</span>);
mongoose.connect(<span class="string">'mongodb://localhost/test'</span>);
<span class="keyword">var</span> Cat = mongoose.model(<span class="string">'Cat'</span>, { name: String });
<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>
console.log(<span class="string">'meow'</span>);
});</code></pre></div><p class="what">Mongoose provides a straight-forward, schema-based solution to modeling your application data and includes built-in type casting, validation, query building, business logic hooks and more, out of the box.</p><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><a href="http://stackoverflow.com/questions/tagged/mongoose">Stack Overflow</a></li><li><a href="https://github.com/learnboost/mongoose/issues/">bug reports</a></li><li><a href="http://groups.google.com/group/mongoose-orm">help forum</a></li><li><a href="http://www.mongodb.org/display/DOCS/Technical+Support">MongoDB</a></li><li>irc: #mongoosejs on freenode</li></ul></div><div id="announcements"><h2>News</h2><ul><li><a href="https://twitter.com/mongoosejs">@mongoosejs</a></li><li><a href="http://groups.google.com/group/mongoose-orm">Google Group</a></li></ul></div><div id="changelog"><h2>Changelog</h2><ul><li><a href="https://github.com/learnboost/mongoose/blob/master/History.md">Changelog</a></li></ul></div><div id="unstable"><h2>Unstable</h2><ul><li><span>The latest <em>unstable </em>release is version 3.7.x. </span><a href="https://github.com/LearnBoost/mongoose/wiki/Development-%28unstable%29-branch-details">What is an unstable release?</a></li></ul></div><div id="production"><h2>Production
<a href="http://mongoosejs.tumblr.com/" target="_blank" title="More production examples">View More</a></h2><ul><li><a href="http://storify.com/" alt="Storify"><img src="docs/images/apps/h_storify.jpg" alt="Storify"></a></li><li><a href="https://learnboost.com/" alt="LearnBoost"><img src="docs/images/apps/h_learnboost.png" alt="LearnBoost"></a></li><li><a href="http://geekli.st" alt="GeekList"><img src="docs/images/apps/h_geeklist.png" alt="GeekList"></a></li><li><a href="http://yourquestions.mcdonalds.ca/" alt="McDonalds"><img id="mcds" src="docs/images/apps/h_mcds.png" alt="McDonalds"></a></li><li><a href="http://www.shoejitsu.com/" alt="ShoeJitsu"><img src="docs/images/apps/h_shoejitsu.png" alt="ShoeJitsu"></a></li><li><a href="https://bozuko.com/" alt="Bozuko"><img src="docs/images/apps/h_bozuko.jpg" alt="Bozuko"></a></li></ul></div></div></div><p id="footer">Licensed under MIT. Copyright 2011 <a href="http://learnboost.com">LearnBoost</a>.</p><script>document.body.className = 'load';</script><script>var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-1122274-9']);
_gaq.push(['_trackPageview', location.pathname + location.search + location.hash]);
(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>