1.

How To Create A Database In Pouchdb?

Answer»

A database is created very easily in POUCHDB by using constructor.

Syntax:

new PouchDB(Database_name) 

You have to install Node.js and a PouchDB package is required using the REQUIRE() method to create a database.

EXAMPLE:

//Requiring the package 

VAR PouchDB = require('PouchDB'); 

//Creating the database object 

var db = new PouchDB('my_database'); 

console.log ("Database created Successfully."); 

A database is created very easily in PouchDB by using constructor.

Syntax:

new PouchDB(Database_name) 

You have to install Node.js and a PouchDB package is required using the require() method to create a database.

Example:

//Requiring the package 

var PouchDB = require('PouchDB'); 

//Creating the database object 

var db = new PouchDB('my_database'); 

console.log ("Database created Successfully."); 



Discussion

No Comment Found