pixelverse-llc / strich-javascript-sample

STRICH SDK integration example using plain JavaScript/HTML/CSS

Home Page:https://strich.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

STRICH SDK integration example using plain JavaScript/HTML/CSS

This repository shows how to use the STRICH SDK to create a barcode scanning application with just plain JavaScript (ES6), HTML and CSS, without using any framework or build tooling.

The app implements three basic scanning workflows that are popular in real-world use cases:

  • Single scan: scans a single barcode and returns the home screen
  • Repeated scans: scans barcodes repeatedly, with a user interaction between scans
  • Multiple scans: scans multiple barcodes until some condition is met

Serving the Example App

The app still needs to be served from a secure origin. For development purposes, we've included a Python script serve_https.py to show how to use Python's built-in capabilities to quickly create a development server.

To create a self-signed certificate, check out any guide on the internet or this Stackoverflow answer: https://stackoverflow.com/a/41366949/1370154

Then run the script in this directory to serve the app over an HTTPS connecting using the self-signed certificate:

$ python3 serve_https.py tls_key.pem tls_cert.pem

Another popular option is to serve the application locally (by using serve_http.py for instance) and expose it via ngrok or similar tools, with an automatically created TLS certificate and public DNS.

About

STRICH SDK integration example using plain JavaScript/HTML/CSS

https://strich.io

License:Creative Commons Zero v1.0 Universal


Languages

Language:JavaScript 51.4%Language:HTML 28.7%Language:CSS 10.1%Language:Python 9.9%