Database - SilasBerger/coachbot-brain GitHub Wiki

CoachBot Brain will use MongoDB as a database, and Mongoose as an ODM. Currently, the development database is hosted on mLab.

Configure Database

In the project root directory, place a file called dbconf.js, which has the following content:

exports.config = {
    host: "<host-URL>",
    port: <port-number>,
    dbName: "<db-name>",
    username: "<db-username>",
    password: "<db-password>"
};

Connect to DB, save and find documents with mongoose

See examples/dbExample.js

Reference

http://mongoosejs.com

⚠️ **GitHub.com Fallback** ⚠️