diff --git a/routes.js b/routes.js index 0584eae..aab545d 100644 --- a/routes.js +++ b/routes.js @@ -10,6 +10,12 @@ var fs = require('fs'); module.exports = function (app, db, config) { // share wraps express app with http.Server + if (config + && config.share + && config.share.db + && config.share.db.type == 'mongo') { + config.share.db.client = db; + } var server = ShareJS.server.attach(app, config.share); var model = app.model; diff --git a/server.js b/server.js index 2919154..3a17bfe 100644 --- a/server.js +++ b/server.js @@ -29,6 +29,10 @@ var config = { }, staticpath: '/lib/share', db: {type: 'none'} +// db: { +// type: 'mongo', +// opsCollectionPerDoc: false +// } }, api: { content: '/content',