Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

175 lines (170 sloc) 12.962 kb
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><title>Mongoose ODM v3.0.0alpha2</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;
}
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
}
pre code {
border: 0 none;
padding: 1.2em;
font-size: 1.1em;
}
#header {
text-align: center;
position: relative;
padding-top: 40px;
}
#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;
}
#header .odm {
font-size: 16px;
position: absolute;
right: 44px;
top: 73px;
color: #535353;
font-weight: normal;
font-family: Helvetica, Arial, FreeSans, sans-serif;
display: none;
}
#header p {
color: #800;
font-size: 25px;
text-shadow: 1px 1px #f8f8f8;
}
#header p 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: #747474;
padding: 9px 67px;
border-radius: 3px;
color: #fff;
text-decoration: none;
}
#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;
}</style></head><body><a 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><div class="odm">ODM</div></a></h1><p>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><p></p><a href="/docs/woot">Flexible</a>, <a href="/docs/todo">schema based</a>, and feature-rich, Mongoose solves common problems for <a href="#production">real-world</a> applications. Its fully customizable middleware, exposed object lifecycle, and rich query syntax make developing applications a breeze.</div><div id="links"><ul><li><a href="/docs/api.html">Docs</a></li><li><a href="http://plugins.mongoosejs.com">Plugins</a></li></ul></div><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></ul></div><div id="production"><h2>Production</h2><ul><li><!--<p><a href="https://www.learnboost.com">LearnBoost</a> is a free online gradebook, lesson planner, attendance, and reporting application for Teachers, Parents, and Students.</p>--><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><!--<p><a href="http://storify.com/">Storify</a> lets you curate social networks to build social stories, bringing together media scattered across the Web into a coherent narrative.</p>--><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><!--<p><a href="https://clickdummy.com">ClickDummy</a> is a rapid mockup prototyping application for designers and dummies.</p>--><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><!--<p><a href="http://scottyapp.com">Scotty App</a> allows you to create data driven backends for your apps in minutes instead of weeks.</p>--><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><!--<p><a href="http://geekli.st">Geeklist</a> 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.</p>--><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><!--<p><a href="https://bozuko.com">Bozuko</a> is an exciting customer rewards program.</p>--><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><!--<p><a href="http://calllistapp.com">Call List</a> helps you maintain a todo list for people you need to call.</p>--><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><!--<p><a href="http://www.gtggolf.com">Grow The Game Golf</a> lets you think, act, and score your golf game like a pro with real-time scoring, live leaderboards and more.</p>--><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><!--<p><a href="http://nextdays.com/">nextdays</a> lets you share plans with friends and discover what is happening around you.</p>--><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><!--<p><a href="http://linkr.cc">Linkr</a> is a service for saving links for reading later.</p>--><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><!--<p><a href="http://www.attictv.com/">AtticTV</a> is Music Television (MTV) for the web.</p>--><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><!--<p><a href="https://localresponse.com">LocalResponse</a> helps marketers respond to real-time consumer intent.</p>--><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><!--<p><a href="http://selectvids.com">Select Vids</a> is a collection of amazing, funny, and creative videos for you to discover.</p>--><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><!--<p><a href="https://cldfy.com/">cldfy</a> delivers mail to your app.</p>--><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><!--<p><a href="http://www.sharelatex.com">ShareLatex</a> is a real-time LaTeX collaboration tool.</p>--><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><!--<p><a href="http://apps.newleafdigital.com/lists">Lists</a> is a service for saving links for reading later.</p>--><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" 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);
})();
// TODO
// get number of groups members?
*/</script></body></html>
Jump to Line
Something went wrong with that request. Please try again.