Skip to content
A minimal node.js express app which has integrated PrizmDoc Viewer.
Branch: master
Clone or download
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 Initial release Jan 10, 2019
documents Initial release Jan 10, 2019
pas Initial release Jan 10, 2019
public 13.8 Release Jun 13, 2019
routes Initial release Jan 10, 2019
views 13.8 Release Jun 13, 2019
.editorconfig Initial release Jan 10, 2019
.eslintrc.js Initial release Jan 10, 2019
.gitignore 13.8 Release Jun 13, 2019
LICENSE 13.8 Release Jun 13, 2019
README.md 13.8 Release Jun 13, 2019
app.js 13.8 Release Jun 13, 2019
check-node-version.js State that node 8+ is required, fail on start if node is less than 8 Jan 10, 2019
config.json5 Make README and config.json5 a little more clear Jan 14, 2019
main.js Initial release Jan 10, 2019
package-lock.json 13.8 Release Jun 13, 2019
package.json 13.8 Release Jun 13, 2019
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.