Skip to content
A minimal node.js express app which has integrated PrizmDoc Viewer.
JavaScript CSS HTML
Branch: master
Clone or download
Pull request Compare This branch is 16 commits ahead, 1 commit behind Accusoft:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
documents
pas
public
routes
views
.editorconfig
.eslintrc.js
.gitignore
LICENSE
Procfile
README.md
app.js
check-node-version.js
config.json5
main.js
package-lock.json
package.json
screenshot.png

README.md

Hello PrizmDoc Viewer with node.js and HTML

A minimal node.js express app which has integrated PrizmDoc Viewer.

Setup

Requirements

Configure Connection to PAS

Configure how to connect to PAS (PrizmDoc Application Services) by editing the config.json5 file (this is just a JSON file with comments).

If you're just getting started, the easiest thing to do is to use PrizmDoc Cloud. We host PAS for you and all you need is your PrizmDoc Cloud API key. If you don't have an API key, you can get one for free at https://cloud.accusoft.com.

For PrizmDoc Cloud:

{
  "pasBaseUrl": "https://api.accusoft.com/prizmdoc",
  "apiKey": "YOUR_API_KEY"
}

For self-hosted PAS:

{
  "pasBaseUrl": "YOUR_PAS_BASE_URL",
  "pasSecretKey": "YOUR_PAS_SECRET_KEY",
}

Alternately, you can set or override any of these values via environment variables:

  • API_KEY
  • PAS_BASE_URL
  • PAS_SECRET_KEY

Install dependencies

npm install

Running the Sample

To start the app:

npm start

This will launch a small web application on http://localhost:8888.

You should see output like this:

> node index.js

[HPM] Proxy created: /pas-proxy  ->  https://api.accusoft.com/prizmdoc
[HPM] Proxy rewrite rule created: "^/pas-proxy" ~> ""
[HPM] Subscribed to http-proxy events:  [ 'error', 'close' ]
Application running at http://localhost:8888

When you visit http://localhost:8888, you should see a viewer with an example document, like this:

You can’t perform that action at this time.