Google News
logo
PouchDB - Interview Questions
How to delete a remote database that is stored on a remotely server CouchDB?
Provide the path of the remotely database CouchDB in PouchDB constructor to delete a database that is stored on a remotely server CouchDB.

For example :
//Requiring the package  
var PouchDB = require('pouchdb');  
//Creating the database object  
var db = new PouchDB('http://localhost:5984/my_database');  
//deleting database  
db.destroy(function (err, response) {  
 if (err) {  
   return console.log(err);  
 } else {  
   console.log("Database Deleted");  
 }  
});  ?
Advertisement