const pg = require('pg-easy');
const conStr = 'postgres://localhost:5432';
exports.db = pg.create({conStr: conStr}, {
getStuff: `select * from stuff
offset $1
limit $2;`
});
exports.getStuff = (offset, limit) => {
return db.getStuff(offset, limit).then(result => result.rows);
};
-
Notifications
You must be signed in to change notification settings - Fork 0
omninews/pg-easy
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Remove the boilerplate of setting up node-pg
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published