floysh / DCC-green-pass-decoder

A simple web app to decode EU Digital Covid Certificate/Green Pass QR codes.
https://floysh.github.io/DCC-green-pass-decoder/
MIT License
44 stars 13 forks source link

Not working locally due to inability to load .json file of certificates #2

Open jumpjack opened 3 years ago

jumpjack commented 3 years ago

The app does not work if run locally, due to inability to load certificate using file:/// protocol; but certificates are not necessary to view the data, of course they are only needed to validate signature. I would like to modify the source by myself, but in src folder I can't find index.html, so I don't understand how the app works.

floysh commented 3 years ago

This is by-design a feature of the Fetch API, which is what I use to retrieve external .json files (you generally don't want websites to gain access to your personal files transparently). I think you've got a point about the breaking errors when validation fails, and it's something I'm definitely going to work on :)

If you want to run this app locally, just start a local webserver at the public folder. Once the server is running, launch npm run watch to automatically pack everything in src/ to public/bundle.js as you edit the code nd reload the page to see changes.