mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
11 lines
263 B
TypeScript
11 lines
263 B
TypeScript
import massive = require('massive');
|
|
|
|
let dbconn: massive.Database;
|
|
|
|
massive('postgres://app:password@localhost:5432/app').then(db => {
|
|
console.log(`DB connected successfully`);
|
|
dbconn = db;
|
|
}).catch(err => {
|
|
console.error(`Error connecting DB`);
|
|
});
|