A Node.js helper library (v1.4.2) wrapping 'node-postgres' (pg) to simplify common PostgreSQL operations, optimized for serverless environments. Provides a DB class with built-in connection pooling and query resolution, plus a GenericQueries base class for structured query definitions. Release cadence is low (no recent updates). Key differentiator: minimal abstraction tailored for serverless functions vs. full ORMs like Sequelize or TypeORM.
npm install jeeng-pgNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows ESM import of DB and GenericQueries, custom query class, and query execution with a callback.
Ensure 'pg' is in package.json dependencies.
Refer to node-postgres docs result format; e.g., (result) => result.rows.
Read connection string from process.env and pass explicitly.
Install @types/pg and declare module manually.
npm install pg
Ensure constructor calls super(db) and db is an instance of DB.
Verify DATABASE_URL includes correct host, port, user, password, database.