Skip to main content

Hooking up to the server


This guide introduces the Collaboration Server and requires you to have it installed.

You can install it by running yarn add @pdftron/collab-server

The collab server requires you to provide a set of resolvers in order to link the server to your database.

The default database ships with these resolvers, so there is no need to write your own!

To get the resolvers, use the getResolvers API. You can pass the result directly into the server.

import CollabServer from '@pdftron/collab-server'
import CollabDatabase from '@pdftron/collab-db-postgresql'
const db = new CollabDatabase({
await db.connectDB();
const resolvers = db.getResolvers();
const server = new CollabServer({

Next steps#