PouchDB - Create Database
You can create a database in PouchDB using the PouchDB constructor.
Following is the syntax of using the PouchDB constructor. To this, you need to pass the name of the database as a parameter.
To create a database in PouchDB using node, first of all, you need to require the PouchDB package using the require() method and then you can create a database as shown in the following example.
//Requiring the package var PouchDB = require('PouchDB'); //Creating the database object var db = new PouchDB('my_database'); console.log ("Database created Successfully.");
This will create a database locally (you can see the folder in the current directory) displaying the following message.
Database created Successfully.