-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
91 lines (85 loc) · 3.09 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
<!doctype html>
<html>
<head>
<title>Backbone.Mongo</title>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css" rel="stylesheet">
<link href="components/app.css" rel="stylesheet">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico" type="image/x-icon">
</head>
<body>
<div class="jumbotron" id="mongo-hero">
<div class="row">
<div class="col-9 col-lg-9">
<h1>Backbone.Mongo</h1>
</div>
<div class="col-3 col-lg-3">
<p class="action_btns">
<a class="btn btn-primary btn-large btn-block" href="http://alexhancock.github.io/backbone-mongo/build/backbone-mongo.js">Download</a>
<a class="btn btn-default btn-large btn-block" target="_blank" href="https://github.com/alexhancock/backbone-mongo">Github</a>
</p>
</div>
</div>
<div class="row">
<div class="col-8 col-lg-10" id="desc">
<p>
<img src="https://travis-ci.org/alexhancock/backbone-mongo.png?branch=master"></img>
Query your Backbone.Collections with the MongoDB API
</p>
</div>
</div>
</div>
<div class="row">
<div class="col-6 col-lg-6 left">
<h2>This project is glue between...</h2>
<ul>
<li><a target="_blank" href="https://github.com/meteor/meteor/tree/master/packages/minimongo">Minimongo</a> - by the <a target="_blank" href="http://meteor.com">Meteor</a> team</li>
<li><a href="http://backbonejs.org/#Collection">Backbone.Collections</a></li>
</ul>
</div>
<div class="col-6 col-lg-6 right">
<h2>Run Mongo queries in the browser</h2>
<p>
You can run mongo queries on your Backbone.Collections, even in your clientside code. Queries run synchronously on a completely in memory implementation of mongo.
</p>
</div>
</div>
<div class="row">
<div class="col-6 col-lg-6 left">
<h2>Queries</h2>
<p>
<pre>
var people = new Backbone.Mongo();
// Use any mongo query you like
var highScorers = people.find({ score: { $gt: 50 }}).fetch();
var obama = people.find({ name: "Barack" }).fetch();
// Inserts and updates work as well
people.insert({ name: "Claire" });
people.update({ name: "Alex" }, { $inc: { score: 10 } });</pre>
</p>
</div>
<div class="col-6 col-lg-6 right">
<h2>Test console</h2>
<div class="console">
<div class="line">
<span class="prompt"> $</span>
<input type="text" id="query" placeholder="people.find({ name: 'Alex'}).fetch();" />
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-12 col-lg-12">
<h2>Query Result</h2>
<div class="results">
</div>
</div>
</div>
</body>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.1/underscore-min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/backbone.js/1.0.0/backbone-min.js"></script>
<!-- <script src="build/backbone-mongo.js"></script> -->
<script data-main="main" src="components/require.js"></script>
<script src="components/require-config.js"></script>
</html>