{"id":42766,"library":"fluent-pg","title":"fluent-pg","description":"fluent-pg is the official PostgreSQL driver for fluent-orm, a Node.js ORM. Version 0.3.6 is the latest stable release. It integrates seamlessly with fluent-orm's configurator pattern, enabling PostgreSQL connections via a simple configuration object. As a driver-only package, it does not include ORM features itself, making it lightweight. It ships TypeScript definitions and is designed for use with fluent-orm. It has a low release cadence.","status":"active","version":"0.3.6","language":"javascript","source_language":"en","source_url":"https://github.com/pedrosoares/fluent-pg","tags":["javascript","PostgreSQL","ORM","JS","Fluent","typescript"],"install":[{"cmd":"npm install fluent-pg","lang":"bash","label":"npm"},{"cmd":"yarn add fluent-pg","lang":"bash","label":"yarn"},{"cmd":"pnpm add fluent-pg","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"CommonJS default export does not exist; named export 'configure' is correct. No ES module export.","wrong":"const fluentPg = require('fluent-pg').default","symbol":"configure","correct":"const { configure } = require('fluent-pg')"},{"note":"Package does not ship ES modules; must use require().","wrong":"import { configurator } from 'fluent-orm'","symbol":"configurator (from fluent-orm)","correct":"const { configurator } = require('fluent-orm')"},{"note":"Runtime dependency, not dev.","wrong":"npm install fluent-pg --save-dev","symbol":"package","correct":"npm install fluent-pg --save"}],"quickstart":{"code":"const { configurator } = require('fluent-orm');\nconst { configure } = require('fluent-pg');\n// Register driver\nconfigurator.use(configure);\n// Configure connection\nconfigurator.configure({\n  default: 'pgsql',\n  connections: {\n    pgsql: {\n      driver: 'pgsql',\n      host: '127.0.0.1',\n      port: '5432',\n      database: 'postgres',\n      user: 'postgres',\n      password: process.env.DB_PASSWORD ?? '1234'\n    }\n  }\n});\n// Now use configurator.get() etc.\nmodule.exports = configurator;","lang":"javascript","description":"Registers the PostgreSQL driver with fluent-orm and configures a connection using environment variables for the password."},"warnings":[{"fix":"Make sure fluent-orm is installed: npm install fluent-orm","message":"fluent-pg is solely a driver; you must install and configure fluent-orm separately.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use require() instead of import.","message":"No ES module support; CommonJS only.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Use process.env.DB_PASSWORD and hide config from version control.","message":"Password passed as plain text in configuration; consider using environment variables.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Always call configurator.use(configure) before configurator.configure().","message":"The driver must be registered before configuring connections; otherwise fluent-orm may not recognize the pgsql driver.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'0.3.6':20 'cadenc':78 'configur':34,42 'connect':38 'definit':63 'design':66 'driver':11,47 'driver-on':46 'enabl':36 'featur':55 'fluent':2,5,14,31,71,83 'fluent-orm':13,30,70 'fluent-pg':1,4 'includ':53 'integr':27 'javascript':79 'js':82 'latest':23 'lightweight':59 'low':76 'make':57 'node.js':17 'object':43 'offici':9 'orm':15,18,32,54,72,81 'packag':49 'pattern':35 'pg':3,6 'postgresql':10,37,80 'releas':25,77 'seamless':28 'ship':61 'simpl':41 'stabl':24 'typescript':62,84 'use':68 'version':19 'via':39","created_at":"2026-06-05T16:56:34.400180+00:00","updated_at":"2026-06-05T16:56:34.400180+00:00","problems":[{"fix":"Run: npm install fluent-pg --save","cause":"Package not installed.","error":"Error: Cannot find module 'fluent-pg'"},{"fix":"Ensure const { configurator } = require('fluent-orm'); is present.","cause":"Missing required import of fluent-orm's configurator.","error":"TypeError: configurator.use is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/pedrosoares/fluent-pg#readme","github":"https://github.com/pedrosoares/fluent-pg","docs":null,"changelog":null,"pypi":null,"npm":"fluent-pg","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-05","next_check":"2026-09-03","install_tag":null}}