Welcome to the API documentation for the PDFTron Webviewer Collaboration Postgres DB Module.
To create the server, instantiate the CollabDatabase class with your desired settings.
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