Create Database in PouchDB

PouchDB Create Database

PouchDB constructor is used in Node.js command prompt to create a database in PouchDB.


new PouchDB(Database_name)


  • Open Node.js command prompt.
  • Create a file named “Example.js” within a folder named “Examples”.
  • Add the below code to the file.



var PouchDB = require('PouchDB');
var x = new PouchDB('Example_Database');
console.log ("Database Successfully Created.");

Open the command prompt and Execute the .js file.

node Example.js

Console Output:

Database Successfully Created.

The newly created Database can then be verified in the current directory.

Please Share