A generic persistence driver for Hocuspocus that stores Y.js document updates in PostgreSQL. This is a community extension (v0.1.1) with no active release schedule. It integrates with the Hocuspocus server ecosystem, allowing collaborative editing data to be persisted in Postgres. It is an alternative to SQLite or other backends, providing SQL-based storage for Hocuspocus-based applications. The package ships TypeScript types. Note: v0.1.1 is early-stage; expect breaking changes.
npm install hocuspocus-extension-postgresNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Sets up a Hocuspocus server with PostgreSQL persistence extension using environment variable for connection.
Pin to specific version and test upgrades; consider using a stable Hocuspocus extension like @hocuspocus/extension-sqlite for production.
Ensure DATABASE_URL environment variable is set or pass a valid connectionString option.
Use import syntax or configure your project to support ESM (e.g., type: 'module' in package.json).
Evaluate @hocuspocus/extension-sqlite or build custom driver with @hocuspocus/extension-database interface.
Switch to import syntax or set type: 'module' in package.json.
Use import { Postgres } from 'hocuspocus-extension-postgres'Ensure PostgreSQL is running and connection string is correct; set DATABASE_URL environment variable.