PostgreSQL patterns for Node.js with pg — connection pooling, parameterized
99
99%
Does it follow best practices?
Impact
100%
1.75xAverage score across 5 eval scenarios
Passed
No known issues
An e-commerce company needs a product catalog backend built with Node.js, TypeScript, and Express. The service reads from and writes to PostgreSQL using the pg package. The database is accessible via a DATABASE_URL environment variable.
The catalog service needs to support:
Products have: id (serial), name, description, price_cents (integer), category, tags (text array), created_at.
Produce:
db.ts -- Database connection moduleproducts.ts -- Functions for all six operations listed abovepackage.json -- With required dependenciesThe code should be complete TypeScript with no placeholders or TODO comments.
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
skills
postgresql-node-best-practices
verifiers