Permalink
Browse files

#10

  • Loading branch information...
olegp committed Feb 25, 2013
1 parent 8e5057a commit b9e551c8ae0b83c644a732d54536a1d413a5335e
Showing with 9 additions and 3 deletions.
  1. +9 −3 README.md
View
@@ -2,7 +2,7 @@
Mongo Sync is a synchronous MongoDB driver for use with [Common Node](http://olegp.github.com/common-node/) that attempts to closely approximate the [MongoDB shell](http://www.mongodb.org/display/DOCS/dbshell+Reference).
-It is a thin wrapper around [Mongolian DeadBeef](https://github.com/marcello3d/node-mongolian/). Here is a quick usage example:
+It is a thin wrapper around [Mongolian DeadBeef](https://github.com/marcello3d/node-mongolian/). Here is a quick usage example that you can use with Common Node:
var Server = require("mongo-sync").Server;
var server = new Server('127.0.0.1');
@@ -12,8 +12,14 @@ It is a thin wrapper around [Mongolian DeadBeef](https://github.com/marcello3d/n
For a complete application using this driver, check out [Notes](https://github.com/olegp/notes/).
-If you want to use Mongo Sync directly with [node-fibers](https://github.com/laverdet/node-fibers) (i.e. without Common Node), make sure all database requests occur within a fiber.
+If you want to use Mongo Sync directly with [node-fibers](https://github.com/laverdet/node-fibers) (i.e. without Common Node), make sure all database requests occur within a fiber, e.g.:
+ var Fiber = require('fibers');
+ Fiber(function() {
+ // set up goes here ...
+ var result = server.db("LashDB").getCollection("users").find().toArray();
+ });
+
### License
(The MIT License)
@@ -24,4 +30,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 comments on commit b9e551c

Please sign in to comment.