Registry / database / courtbot-engine-pg

courtbot-engine-pg

JSON →
library1.3.9jsnpmunverified

Postgres database layer for courtbot-engine, providing persistent storage for court notification systems. Current version 1.3.9, released as part of the courtbot ecosystem. It requires courtbot-engine ^1.3.3 as a peer dependency. Differentiated by its auditing capabilities via PostgreSQL audit trigger 91plus. Designed for Node.js environments with PostgreSQL backends.

npm install courtbot-engine-pg
INSTALL
IMPORT
SIG · COURTBOT-ENGINE-PG
C
courtbot-engine-pg
databasejavascriptv1.3.9
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

courtbot-engine-pg
require('courtbot-engine-pg')
import 'courtbot-engine-pg'
This module is loaded for side effects only; it extends courtbot-engine automatically.
courtbot-engine
const courtbot = require('courtbot-engine')
const courtbot = require('courtbot-engine-pg')
Main functionality comes from courtbot-engine; courtbot-engine-pg is loaded for database support.
routes
courtbot.routes({...})
courtbot.routes(dbUrl: ...)
routes configuration object requires dbUrl property for Postgres.

Sets up an Express app with Postgres-backed courtbot SMS routes.

const courtbot = require('courtbot-engine'); require('courtbot-engine-pg'); const app = require('express')(); app.use('/sms', courtbot.routes({ dbUrl: process.env.DATABASE_URL || 'postgres://user:pass@localhost/courtbot', otherOptions: {} })); app.listen(3000, () => console.log('Courtbot server running on port 3000'));
Debug
Known issues
gotchaMissing peer dependency courtbot-engine
fix
Install courtbot-engine as a separate dependency: npm install courtbot-engine
affects: >=1.0.0
gotchaDatabase URL must include credentials and database name
fix
Use correct PostgreSQL connection string format: postgres://user:password@host:port/database
affects: >=1.0.0
gotchaAudit trigger 91plus must be installed in database
fix
Run the audit trigger SQL script from https://wiki.postgresql.org/wiki/Audit_trigger_91plus
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'courtbot-engine'
courtbot-engine not installed
fix
npm install courtbot-engine
error: relation "courtbot_sessions" does not exist
Database schema not initialized
fix
Run database migrations provided by courtbot-engine
Error: connect ECONNREFUSED 127.0.0.1:5432
PostgreSQL server not running or wrong host/port
fix
Start PostgreSQL and verify DATABASE_URL connection string
Upgrade
Version history
1.3.9latest on npm
Audit
Dependencies
courtbot-enginerequiredPeer dependency required for core courtbot functionality
Agent activity
12 hits · last 30 days
node
10
OpenAI (training)
1
Resources
courtbot-engine-pg — npm install courtbot-engine-pg · libregistry