forked from Automattic/mongoose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
98 lines (86 loc) · 6.02 KB
/
index.html
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
<!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 v5.0.6-pre</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"><link href="/docs/css/github.css" rel="stylesheet"><style>code {
font-size: 1em;
}
.sponsor {
margin-bottom: 40px;
font-size: 0.66em;
color: #666;
}
.sponsors {
margin-bottom: 40px;
}
.carbonad{
margin-top:0!important;
margin-bottom:-3rem!important
}
#carbonads {
position:static;
display:block;
max-width:200px;
padding:15px 15px 15px 160px;
margin-left: auto;
margin-right: auto;
overflow:hidden;
font-size:13px;
line-height:1.4;
text-align:left;
background-color: #fafafa;
}
#carbonads a{color:#333;text-decoration:none}
.carbon-img{float:left;margin-left:-145px}
.carbon-poweredby{display:block;color:#777!important}</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" class="homepage"><div id="header"><h1><a href="https://github.com/Automattic/mongoose" target="blank"><div class="mongoose">Mongoose</div></a></h1></div><div class="tagline"><p>Elegant <a href="https://www.mongodb.com/">MongoDB</a> object modeling for
<a href="https://nodejs.org/en/">Node.js</a></p>
</div><div id="links"><ul><li><a href="docs/guide.html">Read the Docs</a></li><li><a href="http://plugins.mongoosejs.io">Discover Plugins</a></li></ul></div><div id="follow"><ul><li><iframe src="http://ghbtns.com/github-btn.html?user=Automattic&repo=mongoose&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="100px" height="20px" class="github-btn"></iframe></li><li id="version"><span>Version 5.0.6-pre</span></li><li><iframe src="http://ghbtns.com/github-btn.html?user=Automattic&repo=mongoose&type=fork&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><pre><code class="lang-javascript"><span class="hljs-keyword">const</span> mongoose = <span class="hljs-built_in">require</span>(<span class="hljs-string">'mongoose'</span>);
mongoose.connect(<span class="hljs-string">'mongodb://localhost/test'</span>);
<span class="hljs-keyword">const</span> Cat = mongoose.model(<span class="hljs-string">'Cat'</span>, { name: <span class="hljs-built_in">String</span> });
<span class="hljs-keyword">const</span> kitty = <span class="hljs-keyword">new</span> Cat({ name: <span class="hljs-string">'Zildjian'</span> });
kitty.save().then(() => <span class="hljs-built_in">console</span>.log(<span class="hljs-string">'meow'</span>));
</code></pre>
<p>Mongoose provides a straight-forward, schema-based solution to model
your application data. It includes built-in type casting, validation,
query building, business logic hooks and more, out of the box.</p>
<div class="carbon-ad"><script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=mongoosejscom" id="_carbonads_js"></script></div><h2 id="getting-started">Getting Started</h2>
<ul>
<li><a href="/docs/index.html">quick start guide</a></li>
</ul>
<h2 id="support">Support</h2>
<ul>
<li><a href="http://stackoverflow.com/questions/tagged/mongoose">Stack Overflow</a></li>
<li><a href="https://github.com/Automattic/mongoose/issues">GitHub Issues</a></li>
<li><a href="https://gitter.im/Automattic/mongoose">Gitter Chat</a></li>
<li><a href="http://www.mongodb.org/about/support/">MongoDB Support</a></li>
</ul>
<h2 id="news">News</h2>
<ul>
<li><a href="https://twitter.com/mongoosejs">Twitter</a></li>
</ul>
<h2 id="changelog">Changelog</h2>
<ul>
<li><a href="https://github.com/Automattic/mongoose/blob/master/History.md">Changelog</a></li>
</ul>
<h2 id="sponsors">Sponsors</h2>
<div class="sponsors">
<div>
<a href="https://mixmax.com">
<img src="/docs/images/mixmax.png" alt="MixMax.com">
</a>
</div>
</div>
<div class="sponsor">
Sponsor <a href="https://opencollective.com/mongoose">Mongoose on OpenCollective</a> to get your company's logo above!
</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 type="text/javascript">!function(name,path,ctx){
var latest,prev=name!=='Keen'&&window.Keen?window.Keen:false;ctx[name]=ctx[name]||{ready:function(fn){var h=document.getElementsByTagName('head')[0],s=document.createElement('script'),w=window,loaded;s.onload=s.onerror=s.onreadystatechange=function(){if((s.readyState&&!(/^c|loade/.test(s.readyState)))||loaded){return}s.onload=s.onreadystatechange=null;loaded=1;latest=w.Keen;if(prev){w.Keen=prev}else{try{delete w.Keen}catch(e){w.Keen=void 0}}ctx[name]=latest;ctx[name].ready(fn)};s.async=1;s.src=path;h.parentNode.insertBefore(s,h)}}
}('KeenAsync','https://d26b395fwzu5fz.cloudfront.net/keen-tracking-1.1.3.min.js',this);
KeenAsync.ready(function(){
// Configure a client instance
var client = new KeenAsync({
projectId: '59aad9cbc9e77c0001ce1b32',
writeKey: '4B38B0046086885E425D368BFAEAD8FD0D4F2DC2FA2F936FDE058D79508AEFAD9886BC020B96520823BB9C8241D9D9BCFDC0EF52E6033BD89D06E4B24FC13AE955896BF443406269A84DD009CEB5862DCEC944874DB2107FD648DA91ADC1E6DE'
});
client.recordEvent('pageView', {
host: window.location.host,
pathname: window.location.pathname,
hash: window.location.hash
});
});</script></body></html>