PouchDB Create Database - PouchDB

What is PouchDB - Create Database?

In PouchDB, a database can be created easily using PouchDB Constructor.

Syntax

Below is the syntax for PouchDB constructor. For this, the name of the database is to be passed as a parameter.

Example

We can create a database in PouchDB with the help of node,PouchDB package is required using the require() method and database can be created as shown in the below example.

We need to save the code as Create_Database.js. Open cmd and by using node, we need to execute the JavaScript as displayed below.

By doing this, we are now creating a database locally (where the folder in the current directory can be seen) that displays the below message.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

PouchDB Topics