From fb2d954871ed1ca688f806319780b15c68f13546 Mon Sep 17 00:00:00 2001 From: Aiko Mastboom Date: Thu, 2 Jul 2015 14:04:33 +0200 Subject: [PATCH] minor tekst corrections --- README.md | 14 +++++++------- lib/mongoData.js | 3 ++- lib/routes.js | 4 ++-- test/test.mongoData.js | 3 +++ 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index e01c94a..c2bac0a 100644 --- a/README.md +++ b/README.md @@ -10,25 +10,25 @@ Change the mongo url to your mongodb npm start -1. Import content defined in index.html into db: - [/importer/index.html](http://localhost:8000/importer/index.html) -1. View the index.html - [/index.html](http://localhost:8000/index.html) +1. Import content defined in editor.html into db: + [/importer/editor.html](http://localhost:8000/importer/editor.html) +1. View the editor.html + [/editor.html](http://localhost:8000/editor.html) 1. Dogfood viewing of index.html from db: [/page/app/main.index.html](http://localhost:8000/page/app/main.index.html) # Features: -* Realtime, thru sharejs. +* Realtime, using ShareJS. * Run and develop at the same time. * Importing, driven by comment markers. -* Serverside templating, driven by comment markers. +* Server-Side templating, driven by comment markers. # Examples: -all functionality is found index.html +all functionality is found editor.html # Interface: diff --git a/lib/mongoData.js b/lib/mongoData.js index efbd802..24c8bf1 100644 --- a/lib/mongoData.js +++ b/lib/mongoData.js @@ -154,6 +154,7 @@ module.exports = function (config, db, shareModel) { * options: * collection (mandatory) * query (mandatory) + * operation (optional) : version info * update (optional) : extends existing content */ function setMongoContent(data, options, callback) { @@ -163,7 +164,7 @@ module.exports = function (config, db, shareModel) { config.error && config.error('ERR2 setMongoContent', err); return callback && callback(err); } - if (options.operation) { + if (options.operation && options.operation.v) { data.version = options.operation.v; } var dumpData = saveData; diff --git a/lib/routes.js b/lib/routes.js index a933fe3..27c110c 100644 --- a/lib/routes.js +++ b/lib/routes.js @@ -9,7 +9,7 @@ module.exports = function (app, handlers, markers, config) { route = config.api.data + '/:collection/:guid/:attribute.:ext(css|less|js|html)'; app.get(route, function getAttributeByGUID(req, res, next) { - config.debug && config.debug(config.api.data + '/:collection/:guid/:attribute.:ext(less|js|html)'); + config.debug && config.debug(config.api.data + '/:collection/:guid/:attribute.:ext(css|less|js|html)'); var options = { collection: req.params.collection, attribute: req.params.attribute, @@ -40,7 +40,7 @@ module.exports = function (app, handlers, markers, config) { route = config.api.content + '/:collection/:name/:attribute.:ext(css|less|js|html)'; app.get(route, function getAttributeByName(req, res, next) { - config.debug && config.debug(config.api.content + '/:collection/:name/:attribute.:ext(less|js|html)'); + config.debug && config.debug(config.api.content + '/:collection/:name/:attribute.:ext(css|less|js|html)'); var options = { collection: req.params.collection, attribute: req.params.attribute, diff --git a/test/test.mongoData.js b/test/test.mongoData.js index 29c6365..ef6bfe0 100644 --- a/test/test.mongoData.js +++ b/test/test.mongoData.js @@ -14,6 +14,9 @@ var config = { info: function () { //console.log(arguments); }, + warn: function () { + //console.error(arguments); + }, error: function () { //console.error(arguments); }