Git Product home page Git Product logo

health-cards-tests's Introduction

Using the hosted demo components

Mobile Wallet demo at https://c19.cards

  • Click "Connect to Lab and get tested" to retrieve a VC
  • Review details (URLs, DIDs, keys, etc) in Dev Tools
  • Menu > "Scan QR Code" to share your VC with a verifier (e.g., the Verifier demo below)

Verifier demo at https://c19.cards/venue

  • OpenID Request QR code is displayed automatically
  • Review details (URLs, DIDs, keys, etc) in Dev Tools
  • Scan the barcode from your Mobile Wallet to share your VC (e.g., the Mobile Wallet demo above)

Run locally in dev, with node and parcel watchers

This demo should work wiht Node.js 15 (current LTS) as well as Node.js 13. See Dockerfile for details if you want to build/develop locally using docker; otherwise, you can get started with:

git clone https://github.com/smart-on-fhir/health-cards-tests
cd health-cards-tests

# In first terminal
export SERVER_BASE=http://localhost:8080/api
npm run dev-ui # Terminal 1

# In second terminal
export SERVER_BASE=http://localhost:8080/api
npm run dev    # Terminal 2

Build and run locally (no watchers)

npm run build-ui
npm run build

export SERVER_BASE=http://localhost:8080/api
npm run dev

Run locally in Docker

docker build -t health-wallet-demo .
docker run --rm -it --env SERVER_BASE=http://localhost:8080/api -p 8080:8080 health-wallet-demo

Run dev-only containers with watchers in Docker-Compose

export USER=$(id -u) 
docker-compose --env-file ./compose.env up

You can use the docker-compose.yaml file to spin up two dev containers with watchers, one for the UI and one for the server.

Note the following:

  1. Both containers have their src directories bind-mounted to the local directory's src folder. Any changes made in the dev container (or the host) will propagate to both containers + host and be registered by the watchers. This is helpful since you can, for instance, launch programs inside the dev container and utilize dev dependencies without needing to ever install them locally.
  2. Both containers have their dist folders mounted to a named volume. This means the parcel watcher in the dev-ui container can write changes that are accessible by the dev container. Note the dev-ui container needs root priviliges for this. See this issue for details.
  3. The dev-ui container has root priviliges, but it has been given read-only access to the src folder. Any changes to src made from within this container will not be seen by the host or dev container.

Testing endpoins

See testing-endpoints.md for details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.