Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 655 Bytes

README.md

File metadata and controls

39 lines (26 loc) · 655 Bytes

cs-mongo

A MongoDB adapter for Cornerstone

To install

We will eventually push this project to npm, but for now:

npm install git://github.com/ConnectAi/cs-mongo.git

Configure

Under any environment in your config.json file, in a Cornerstone project:

    ...

	"db": {
		"adapter": "mongodb",
		"mongodb" : {
			"host": "mongodb://localhost:27017/${DATABASE}"
		}
	}

    ...

Usage

app.db.collection("${COLLECTION}")
    .find({ name: "Taylor Swift" })
    .toArray(function(err, results) {
        console.log(results);
    });