You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And I want to invoke it to modifiy my docs once it is stored in couchdb . The docs will be syncing from the pouchdb that is running in a cordova app background . This is what I have tried to implement
var argv = require('minimist')(process.argv.slice(2));
var logLocation=argv.pouchlog;
var controlFileHandler=argv.controlfh;
var express = require('express')
var app = express()
var PouchDB = require('pouchdb')
let InMemPouchDB = PouchDB.defaults({db: require("memdown"), migrate: false})
app.use('', require('express-pouchdb')(InMemPouchDB, {mode:'minimumForPouchDB',logPath:logLocation}))
app.listen(3005)
var db = new InMemPouchDB('todos',{revs_limits: 1});
var remoteCouch = 'http://127.0.0.1:5984/todos';
But its not working , Please can you guys help me in the implementation . The aim is to trigger the update_handler function only when the data is stored in the Couchdb ( and indicates the data syncing between multiple pouchdb is not secure unless it is stored in the couchdb ). Please help me solve the issue.
The text was updated successfully, but these errors were encountered:
Hello , I have been trying to implement the design document for update handler in couchdb
And I want to invoke it to modifiy my docs once it is stored in couchdb . The docs will be syncing from the pouchdb that is running in a cordova app background . This is what I have tried to implement
var argv = require('minimist')(process.argv.slice(2));
var logLocation=argv.pouchlog;
var controlFileHandler=argv.controlfh;
var express = require('express')
var app = express()
var PouchDB = require('pouchdb')
let InMemPouchDB = PouchDB.defaults({db: require("memdown"), migrate: false})
app.use('', require('express-pouchdb')(InMemPouchDB, {mode:'minimumForPouchDB',logPath:logLocation}))
app.listen(3005)
var db = new InMemPouchDB('todos',{revs_limits: 1});
var remoteCouch = 'http://127.0.0.1:5984/todos';
db.changes({live: true}).on('change', console.log);
this.db = db;
db.sync(remoteCouch,{live:true,retry:true}).on('active',function(){
Update.update('_design/secure', function(doc){
console.log("Data Secured");
console.log(doc);
})
But its not working , Please can you guys help me in the implementation . The aim is to trigger the update_handler function only when the data is stored in the Couchdb ( and indicates the data syncing between multiple pouchdb is not secure unless it is stored in the couchdb ). Please help me solve the issue.
The text was updated successfully, but these errors were encountered: