PostgreSQL Driver

The PostgreSQL driver lets you configure Nymph to query and save data to a Postgres database.

Installation

npm install --save @nymphjs/driver-postgresql

Usage

Supply an instance of this driver with its configuration to Nymph's constructor.

import { Nymph } from '@nymphjs/nymph';
import PostgreSQLDriver from '@nymphjs/driver-postgresql';

const postgresqlConfig = {
  host: 'your_db_host',
  database: 'your_database',
  user: 'your_user',
  password: 'your_password',
};

const nymph = new Nymph({}, new PostgreSQLDriver(postgresqlConfig));

// All done. Nymph is ready to use.

Options

See the config declaration file.