Options
All
  • Public
  • Public/Protected
  • All
Menu

@pdftron/collab-db-postgresql

WebViewer Collaboration Postgres Database

Welcome to the API documentation for the PDFTron Webviewer Collaboration Postgres DB Module.

Creating the database instance

To create the server, instantiate the CollabDatabase class with your desired settings.

View all the settings here

import CollabDatabase from '@pdftron/collab-db-postgresql';
import CollabServer from '@pdftron/collab-server';

const db = new CollabDatabase({
host: '127.0.0.1',
port: 5432,
dbName: 'mydb',
username: 'postgres',
password: 'pdftron'
});

await db.connectDB();

const resolvers = db.getResolvers();

const server = new CollabServer({
resolvers,
...otherParams
})

server.start();

Generated using TypeDoc