1
0
mirror of /repos/Prototyper.git synced 2025-12-30 06:31:32 +01:00

minor tekst corrections

This commit is contained in:
Aiko Mastboom 2015-07-02 14:04:33 +02:00
parent 5dcbee626b
commit fb2d954871
4 changed files with 14 additions and 10 deletions

View File

@ -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:

View File

@ -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;

View File

@ -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,

View File

@ -14,6 +14,9 @@ var config = {
info: function () {
//console.log(arguments);
},
warn: function () {
//console.error(arguments);
},
error: function () {
//console.error(arguments);
}