@npmineral/flouch v0.0.21
flouch

Introduction
Initialize your pouchdb databases easily with a configuration file
Currently runs with:
- pouchdb v7.2.2
- pouchorm v1.3.0
With this lib, you can :
- Easily configure pouchdb databases
- Create it with the cli command
Getting Started
Install library using :
npm i @npmineral/flouchConfiguration file
You can setup your configuration in several ways :
- in
flouch.config.jsorflouch.config.ts - in
package.jsonunderflouchkey - indicate the config file path when running the program
flouch --config "path-to-file"Usage
Set your configuration file with those attributes :
interface IDatabaseConfiguration {
id?: string;
name?: string;
url?: string;
protocol?: string;
hostname?: string;
port?: string | number;
username?: string;
password?: string;
type?: POUCH_DB_TYPE;
}Create a config file in a terminal window
cat > flouch.config.jsDatabase types
It is possible to create all pouchdb database types
- IndexedDB
- WebSQL
- HTTP (CouchDB)
- LevelDB
Using one a these type
enum POUCH_DB_TYPE {
HTTP,
LEVEL,
INDEXED,
WEBSQL,
}Note: you can create local or remote databases.
Local
You have to indicate at least the name attribute
Remote
You have to indicate at least the url attribute or all others.
If you indicate both url and others, others will be considered
For example :
{
"url": "http://db-hostname:5984.com/db-name",
"name": "my-db-name"
}The name of the database will be "my-db-name"
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago