Open Navigation

Run the Demo App

If you have already followed the instructions in Create a Demo Solution you should have set up a simple workflow and solution ready to be issued to end users. You should also have generated a Master Token which will be needed by your applications for API access.

Now you can make use of our demo app which shows the basic API calls required, and runs a simple local server which can be used to register users and trigger the solution configuration screens, as configured in Solution Quickstart.

The demo can be cloned / downloaded from:

https://github.com/trayio/embedded-edition-sample-app

Dependencies

  • nodejs
  • npm (installed as part of nodejs)

Setup and run

Once downloaded open a terminal and cd to the demo app directory. Then install the necessary packages:

npm install

Now run the application with:

./setup.sh

You will be prompted to enter the following necessary information:

TRAY_ENDPOINT=prod
TRAY_MASTER_TOKEN=<your partner token>
TRAY_PARTNER=<your partner name>

Entering your Partner Name and Master Token will connect the demo to your account in the Tray backend and thus you will have access to the workflows and solutions configured for your company.

Your Partner Name is set in the Profile section of your account (the only actual implication it has is for loading Config Wizard CSS):

profile-set-partner-id

While your Master Token is generated in the token section of your dashboard:

master-key

Once entered, your server should start running and open automatically in your default browser at localhost:3000 (note that you may have to make an invalid security certificate exception)

You will then be able to login or register as a new end user:

login-register

Once logged in you will be presented with the end user dashboard:

demo-dashboard

If your workflow and solution are setup correctly, clicking on 'Use' will present you with the configuration pop-up for your integration.

Was this article helpful?
Yes
No