0.0.2 • Published 7 years ago

sqmicro-connection v0.0.2

Weekly downloads
1
License
UNLICENSED
Repository
-
Last release
7 years ago

Общие инструменты для компонентов 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
);
0.0.2

7 years ago

0.0.1

7 years ago