JSPM

hocuspocus-extension-postgres

0.1.1
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 5
    • Score
      100M100P100Q31452F
    • License MIT

    a generic Hocuspocus persistence driver for postgres

    Package Exports

    • hocuspocus-extension-postgres
    • hocuspocus-extension-postgres/dist/index.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (hocuspocus-extension-postgres) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    hocuspocus-extension-postgres

    a generic Hocuspocus persistence driver for postgres

    Usage

    import { Logger } from '@hocuspocus/extension-logger'
    import { Server } from '@hocuspocus/server'
    import { Postgres } from 'hocuspocus-extension-postgres'
    
    const port = process.env.PORT ?? 1234
    
    const server = Server.configure({
      port,
      extensions: [
        new Logger(),
        new Postgres({
          connectionString: 'postgres://postgres@localhost:5432/postgres',
        }),
      ],
    })
    
    server.listen()

    License

    MIT License