pglistend is a lightweight Postgres LISTEN daemon built on node-postgres and systemd. It runs as a background process that listens on configured database channels and executes custom actions (e.g., scripts) upon receiving NOTIFY signals. Version 0.2.1-0 is the latest stable release (as of 2022). The package provides a CLI tool and systemd service integration for Linux. It is designed for projects that leverage PostgreSQL's LISTEN/NOTIFY for event-driven workflows, offering a simple, generic alternative to heavier pub/sub systems.
npm install pglistendNo compatibility data collected yet for this library.
Global install, daemon setup, config, start service, and view logs.
Use sudo for setup and systemctl commands.
Ensure config file exists at /etc/pglistend/config.yml or use --config flag.
Use Linux with systemd, or run manually via npm start on other OS.
Install pg alongside pglistend: npm install -g pglistend pg
Check if PostgreSQL is running, or change port in config.yml
Create the database in PostgreSQL before starting pglistend