Skip to content

Template of a live-demo-webapplication of a planqk-usecase. Can be forked to use with your own webapp (Angular, React, …)

License

Notifications You must be signed in to change notification settings

viralitygmbh/planqk-webapp-demo-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PlanQK Webapp Demo Template

Overview

This repository contains a template to add a webapp as a demo for an usecase to PlanQK. It includes the web application (webapp) and a PlanQK proxy. You find more information about the demo-deployment in the PlanQK documentation.

Quick Start

To start the application locally, execute ./build-docker.sh. Ensure you have set the necessary environment variables, for instance, by using an .env file. You can then access the project at http://localhost:8085.

Components

PlanQK Proxy

The PlanQK proxy is a straightforward intermediary that forwards requests to the PlanQK service. It utilizes the following environment variables, which can be generated by a PlanQK application on the PlanQK Platform and set in the settings of the use-case demonstrator:

CONSUMER_KEY=
CONSUMER_SECRET=
SERVICE_ENDPOINT=
DEMO_DATA={"data":{}, "params:{}"}
PORT=8080

The proxy facilitates the following REST calls:

  • POST /planqk/create - Initiates a new run of the defined service on the PlanQK platform. The request body should contain a JSON as defined in the PlanQK Service. The response includes the ID of the created instance.
  • GET /planqk/status/{id} - Retrieves the status of the run with the specified ID. This can be polled from the webapp to check if the instance has completed.
  • GET /planqk/result/{id} - Obtains the result of the instance with the specified ID. This can be requested from the webapp once the run has finished.

WebApp

The webapp directory contains the build of the web application (e.g., an Angular or React application). The webapp can communicate with the PlanQK proxy to initiate a new instance of the defined service on the PlanQK platform, poll the status of the instance, and request its result.

About

Template of a live-demo-webapplication of a planqk-usecase. Can be forked to use with your own webapp (Angular, React, …)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published