{"id":8093,"date":"2015-11-26T13:37:29","date_gmt":"2015-11-26T13:37:29","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2015\/11\/26\/replicate-data-from-couchdb-to-pouchdb-for-offline-storage-on-windows-7-using-google-chrome-v22-open-source-projects-pouchdb-pouchdb\/"},"modified":"2022-08-30T15:03:01","modified_gmt":"2022-08-30T15:03:01","slug":"replicate-data-from-couchdb-to-pouchdb-for-offline-storage-on-windows-7-using-google-chrome-v22-open-source-projects-pouchdb-pouchdb","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2015\/11\/26\/replicate-data-from-couchdb-to-pouchdb-for-offline-storage-on-windows-7-using-google-chrome-v22-open-source-projects-pouchdb-pouchdb\/","title":{"rendered":"Replicate data from CouchDB to PouchDB for offline storage on windows 7 using google Chrome V22-open source projects pouchdb\/pouchdb"},"content":{"rendered":"<p>I am trying to replicate data from CouchDB to PouchDB for offline storage using the code to pull data from CouchDB:<\/p>\n<pre><code>db.replicate.from('http:\/\/test.iriscouch.com\/todo','idb:\/\/todo', function (err, changes) {\nif (err) {\n    console.log(err);\n}\nelse {\n    console.log(changes);\n}});\n$scope.loadTodos(response.rows);\n<\/code><\/pre>\n<p>I get these errors:<\/p>\n<ul>\n<li>Failed to load resource: the server responded with a status of 405 (Method Not Allowed)<\/li>\n<li>XMLHttpRequest cannot load http:\/\/test.iriscouch.com\/todo\/. Origin null is not allowed by Access-Control-Allow-Origin.<\/li>\n<li>Uncaught TypeError: Cannot call method &#8216;id&#8217; of undefined<\/li>\n<\/ul>\n<p>Is there something I&#8217;m not doing correct?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am trying to replicate data from CouchDB to PouchDB for offline storage using the code to pull data from CouchDB: db.replicate.from(&#8216;http:\/\/test.iriscouch.com\/todo&#8217;,&#8217;idb:\/\/todo&#8217;, function (err, changes) { if (err) { console.log(err); } else { console.log(changes); }}); $scope.loadTodos(response.rows); I get these errors: Failed to load resource: the server responded with a status of 405 (Method Not Allowed) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-8093","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/8093","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=8093"}],"version-history":[{"count":1,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/8093\/revisions"}],"predecessor-version":[{"id":8630,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/8093\/revisions\/8630"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=8093"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=8093"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=8093"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}