sqmicro-connection

0.0.2 • Public • Published

Общие инструменты для компонентов sqmicro: обзор

Инсталляция

npm install --save sqmicro-connection

Использование

Класс «соединение».

// Use pg driver from sqmicro-driver-pg module.
const { Connection } = require('sqmicro-commons')('pg');
const connectionString = 'postgresql://user:password@localhost:5432/dbname';
const connection = new Connection({ connectionString });
connection.connect().then(
    () => console.log(`connected to the ${connection.safeUrl}`),
    console.error
);

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i sqmicro-connection

    Weekly Downloads

    1

    Version

    0.0.2

    License

    UNLICENSED

    Last publish

    Collaborators

    • tutukin