Javatpoint Logo
Javatpoint Logo

PouchDB Create Database

We can create a database in PouchDB by using PouchDB constructor in Node.js command prompt. You have to pass the name of the database as a parameter.


Create Database Example

First open Node.js command prompt. Now you need to require the PouchDB package using the require() method and then you can create a database.

See this example:

Save the above code in a file named "Create_Database.js" within a folder name "PouchDB_Examples". Open the command prompt and execute the JavaScript file using node:

PouchDB Create database 1

You can see "Database created successfully" message on your console. You can see the locally created Database folder in your current directory.

PouchDB Create database 2

Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA