0.3.7 • Published 12 years ago

clientmongo v0.3.7

Weekly downloads
38
License
-
Repository
-
Last release
12 years ago

clientmongo

MongoDB on the client

Example

// client.js
var clientmongo = require("clientMongo"),
    Users = clientmongo("Users")

Users.insert({
    foo: "bar"
}, function () {
    Users.findOne({ foo: "bar" }, function (err, person) {
        console.log(person.foo === "bar")
    })
})

// server.js

var server = require("express").createServer(),
    clientmongo = require("clientmongo")(server)

For a full example run the unit test suite (one code base) on both the server and the client.

To clarify, you can run the exact same code that interacts with mongoDB in both the browser and the server using clientmongo

Tests

  1. Install dependencies $ npm install
  2. Run server-side tests make test
  3. Boot server for client-side tests make test-server
  4. Build client-side code for client-side tests make test-build
  5. Run tests in browser (localhost:3000) or make test-run
0.3.7

12 years ago

0.3.6

12 years ago

0.3.5

12 years ago

0.3.4

12 years ago

0.3.3

12 years ago

0.3.2

12 years ago

0.3.1

12 years ago

0.3.0

12 years ago

0.2.1

12 years ago

0.2.0

12 years ago