https://github.com/pixelverse-llc/strich-javascript-sample
STRICH SDK integration example using plain JavaScript/HTML/CSS
https://github.com/pixelverse-llc/strich-javascript-sample
barcode-scanning strich-sdk vanilla-js
Last synced: 21 days ago
JSON representation
STRICH SDK integration example using plain JavaScript/HTML/CSS
- Host: GitHub
- URL: https://github.com/pixelverse-llc/strich-javascript-sample
- Owner: pixelverse-llc
- License: cc0-1.0
- Created: 2023-05-01T05:59:22.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-29T08:19:46.000Z (3 months ago)
- Last Synced: 2025-02-09T00:15:02.629Z (2 months ago)
- Topics: barcode-scanning, strich-sdk, vanilla-js
- Language: HTML
- Homepage: https://strich.io
- Size: 42 KB
- Stars: 8
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://docs.strich.io/deployment-guide.html). 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:
```shell
$ 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](https://ngrok.com) or similar tools, with an automatically created TLS certificate and public DNS.