sqmicro-connection
v0.0.2
Published
Connection abstraction for SQ Micro.
Downloads
5
Readme
Общие инструменты для компонентов 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
);