Skip to content

Instantly share code, notes, and snippets.

@Raynos

Raynos/client.js Secret

Created April 14, 2012 00:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Raynos/aa93e152c2d13049c79b to your computer and use it in GitHub Desktop.
Save Raynos/aa93e152c2d13049c79b to your computer and use it in GitHub Desktop.
var clientmongo = require('clientmongo'),
madness = clientmongo("Madness")
madness.findOne({ "this": "is sparta" }, function (err, doc) {
document.getElementById("says").textContent = doc.this
})
// indexPath is absolute
bundle.require({ "clientmongo": indexPath })
bundle.addEntry(path.join(__dirname, "client.js"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment