我想將數據庫記錄轉儲到指定的位置。我該怎麼做? 我從這個鏈接https://github.com/nolanlawson/pouchdb-replication-stream 嘗試,但我得到錯誤的FS沒有定義 這裏是代碼錯誤顯示爲「fs未定義」
var db=new PouchDB('company_details');
function dumpdata(){
var ws = fs.createWriteStream('file:///C:/xampp/htdocs/sevenadmin/db/output.txt');
db.dump(ws).then(function (res) {
//res should be {ok: true}
});
}
什麼爲fs這裏。我力求得到它。我該如何解決它。 我使用pouchdb和javascript。當我提交表單時,數據保存在位於瀏覽器本身的indexeddb中。現在我想把它保存在指定的位置。任何方式?
你必須定義'fs';它可能應該是'需要'需要的'FileSystem'子系統。 – Pointy
我該如何定義..你可以顯示bcoz我已經嘗試了很多方法。 – Carlos
fs是FileSystem,您不能在瀏覽器中使用它。 – Cruiser