We provide an isomorphic (works on server and client) utility package to help use the PDF.js Express API. This package manages authentication, license keys, file uploads, etc.
The package is open source and the source can be found here
This is the recommended way to use the REST APIs. It is fully tested and works both on the server and client.
Get the utility package