@creanet/js-db
v2.7.1
Published
Used for communication between NodeJS and PostgreSQL
Downloads
10
Readme
js-db
Module used for communication between NodeJS and PostgreSQL.
Creating DB instance
To create a new DB instance call DB constructor.
const DB = require('@creanet/js-db');
const db = new DB(params);
The constructor requires parameters necessary to create connection with db:
| Parameter | Description | Example | | ------------ | ----------------------------------- | ---------------- | | user | The user of the DB | lorem | | database | The name of the DB | ipsum | | password | The password of the user | dolor.sit.amet | | host | The host of the DB | db.websupport.sk | | port | The port to be used when connecting | 1234 |