7
7
[ ![ Circle CI] [ circle_b ]] [ circle_l ]
8
8
[ ![ npm downloads] [ dn_b ]] [ dn_l ]
9
9
[ ![ Coverage Status] [ cov_b ]] [ cov_l ]
10
- [ ![ Codacy] [ cod_b ]] [ cod_l ]
11
10
12
11
MongoDB adapter for [ js-data] ( http://www.js-data.io/ ) .
13
12
14
- ## Table of contents
13
+ To get started, visit __ [ http://js-data.io ] ( http://www.js-data.io/docs/js-data-mongodb ) __ .
15
14
16
- * [ Quick start] ( #quick-start )
17
- * [ Guides and Tutorials] ( #guides-and-tutorials )
18
- * [ API Reference Docs] ( #api-reference-docs )
19
- * [ Community] ( #community )
20
- * [ Support] ( #support )
21
- * [ Contributing] ( #contributing )
22
- * [ License] ( #license )
15
+ ## Links
23
16
24
- ## Quick Start
25
- ` npm install --save js-data js-data-mongodb mongodb bson ` .
26
-
27
- ``` js
28
- // Use Container instead of DataStore on the server
29
- import {Container } from ' js-data'
30
- import MongoDBAdapter from ' js-data-mongodb'
31
-
32
- // Create a store to hold your Mappers
33
- const store = new Container ({
34
- mapperDefaults: {
35
- // MongoDB uses "_id" as the primary key
36
- idAttribute: ' _id'
37
- }
38
- })
39
-
40
- // Create an instance of MongoDBAdapter with default settings
41
- const adapter = new MongoDBAdapter ()
42
-
43
- // Mappers in "store" will use the MongoDB adapter by default
44
- store .registerAdapter (' mongodb' , adapter, { default: true })
45
-
46
- // Create a Mapper that maps to a "user" collection
47
- store .defineMapper (' user' )
48
- ```
49
-
50
- ``` js
51
- async function findAllAdminUsers () {
52
- // Find all users where "user.role" == "admin"
53
- return await store .findAll (' user' , {
54
- role: ' admin'
55
- })
56
- }
57
- ```
58
-
59
- ## Guides and Tutorials
60
-
61
- [ Get started at http://js-data.io ] ( http://js-data.io )
62
-
63
- ## API Reference Docs
64
-
65
- [ Visit http://api.js-data.io ] ( http://api.js-data.io ) .
66
-
67
- ## Community
68
-
69
- [ Explore the Community] ( http://js-data.io/docs/community ) .
70
-
71
- ## Support
72
-
73
- [ Find out how to Get Support] ( http://js-data.io/docs/support ) .
74
-
75
- ## Contributing
76
-
77
- [ Read the Contributing Guide] ( http://js-data.io/docs/contributing ) .
17
+ * [ Quick start] ( http://www.js-data.io/docs/home#quick-start ) - Get started in 5 minutes
18
+ * [ Guides and Tutorials] ( http://www.js-data.io/docs/home ) - Learn how to use JSData
19
+ * [ ` MongoDBAdapter ` Guide] ( http://www.js-data.io/docs/js-data-mongodb ) - Learn how to use ` MongoDBAdapter `
20
+ * [ API Reference Docs] ( http://api.js-data.io ) - Explore components, methods, options, etc.
21
+ * [ Community & Support] ( http://js-data.io/docs/community ) - Find solutions and chat with the community
22
+ * [ General Contributing Guide] ( http://js-data.io/docs/contributing ) - Give back and move the project forward
23
+ * [ Contributing to js-data-mongodb] ( https://github.com/js-data/js-data-mongodb/blob/master/.github/CONTRIBUTING.md )
78
24
79
25
## License
80
26
@@ -90,11 +36,9 @@ Copyright (c) 2014-2016 js-data-mongodb project authors
90
36
[ sl_l ] : http://slack.js-data.io
91
37
[ npm_b ] : https://img.shields.io/npm/v/js-data-mongodb.svg?style=flat
92
38
[ npm_l ] : https://www.npmjs.org/package/js-data-mongodb
93
- [ circle_b ] : https://img.shields.io/circleci/project/js-data/js-data-mongodb/master .svg?style=flat
94
- [ circle_l ] : https://circleci.com/gh/js-data/js-data-mongodb/tree/master
39
+ [ circle_b ] : https://img.shields.io/circleci/project/js-data/js-data-mongodb.svg?style=flat
40
+ [ circle_l ] : https://circleci.com/gh/js-data/js-data-mongodb
95
41
[ dn_b ] : https://img.shields.io/npm/dm/js-data-mongodb.svg?style=flat
96
42
[ dn_l ] : https://www.npmjs.org/package/js-data-mongodb
97
- [ cov_b ] : https://img.shields.io/coveralls/js-data/js-data-mongodb/master.svg?style=flat
98
- [ cov_l ] : https://coveralls.io/github/js-data/js-data-mongodb?branch=master
99
- [ cod_b ] : https://img.shields.io/codacy/1f45ede49dfb4bdea68f46ca55631968.svg
100
- [ cod_l ] : https://www.codacy.com/app/jasondobry/js-data-mongodb/dashboard
43
+ [ cov_b ] : https://img.shields.io/codecov/c/github/js-data/js-data-mongodb.svg?style=flat
44
+ [ cov_l ] : https://codecov.io/github/js-data/js-data-mongodb
0 commit comments