A MongoDB adapter for Cornerstone
We will eventually push this project to npm
, but for now:
npm install git://github.com/ConnectAi/cs-mongo.git
Under any environment in your config.json
file, in a Cornerstone project:
...
"db": {
"adapter": "mongodb",
"mongodb" : {
"host": "mongodb://localhost:27017/${DATABASE}"
}
}
...
app.db.collection("${COLLECTION}")
.find({ name: "Taylor Swift" })
.toArray(function(err, results) {
console.log(results);
});