[go: up one dir, main page]

Skip to content

A demonstration app for the Percolate Developer Platform (PDP) written in Typescript

Notifications You must be signed in to change notification settings

percolate/crostini

Repository files navigation

Crostini

An app for demonstrating functionality of the Percolate Developer Platform, written in Typescript using Express.

Defines a manifest and a Heroku app. The manifest defines both lifecycle callback and UI extension URLs, which are served by the Heroku app.

For a similar app written in Python, see Biscotti.

Running the app locally

To create an application server running on your own machine instead of Heroku, use the following guide.

Run the server

  1. Install dependencies: npm install
  2. Run the app: npm start
  3. Verify it's working by navigating to http://localhost:3000, you should see the string hi

Expose the app publicly with ngrok

  1. Install ngrok
  2. Expose the running local server publicly: ngrok http 3000
  3. Change the URL domains in the manifest to use the URL displayed by the ngrok command. If you see the line Forwarding https://490d31a3.ngrok.io -> http://localhost:3000, this means that the prclt-crostini.herokuapp.com domains should be changed to 490d31a3.ngrok.io
  4. Upload the modified app manifest in the "App registration" page
  5. Install the app in the "Manage apps" page
  6. Verify that your local app received callback request to /install in the server logs

Update the app secret

  1. Stop the app if it is running
  2. Navigate to the app details by clicking on the app in the "App registration" page
  3. Click the "Show app secret" button to view the secret
  4. Start the app back up with the APP_SECRET environment variable set to the value shown, an example of this command:
    APP_SECRET=c12de0430670c1e251e0502aa3afb385374df5337bdd20b27b0e77fc702c9b1a \
    npm start
    
  5. Navigate to a page with a UI component served by the app and verify that the JWT payload is properly decoded - you should see a JSON payload under the "decoded" header

About

A demonstration app for the Percolate Developer Platform (PDP) written in Typescript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published