This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Daten werden in PouchDB synchronisiert

  • Loading branch information...
barbalex committed Sep 11, 2014
1 parent e940165 commit 2edcdc0c09c7f1421b72580437c91bb7ba649557
View
@@ -40,6 +40,7 @@
"vinyl-source-stream": "~1.0.0",
"gulp-util": "~3.0.1",
"pretty-hrtime": "~0.2.1",
"jquery": "~2.1.1"
"jquery": "~2.1.1",
"pouchdb": "~3.0.5"
}
}
@@ -4,6 +4,9 @@ Diese Funktionen werden in evab auf mehreren Seiten benutzt
window.em = window.em || {};
var sync = require('./modules/dbSync');
sync();
window.em.melde = function(Meldung) {
'use strict';
$("<div id='meldung' data-role='popup' class='ui-content' data-overlay-theme='a'><a href='#' data-rel='back' class='ui-btn ui-corner-all ui-shadow ui-btn-a ui-icon-delete ui-btn-icon-notext ui-btn-right'>Close</a>"+Meldung+"</div>")

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,26 @@
/**
* synchronisiert die Daten aus einer CouchDB in PouchDB
*/
'use strict';
var PouchDB = require('pouchdb');
exports.sync = function() {
var db = new PouchDB('ab'),
remoteCouch = 'http://barbalex:dLhdMg12@127.0.0.1:5984/evab';
function sync() {
if (remoteCouch) {
var opts = {live: true};
db.replicate.to(remoteCouch, opts, syncError);
db.replicate.from(remoteCouch, opts, syncError);
}
}
function syncError() {
console.log('error syncing');
}
return sync();
};

This file was deleted.

Oops, something went wrong.

0 comments on commit 2edcdc0

Please sign in to comment.