Mini QR generator as an HTTP microservice
Go to file
blek 8cc71cda99
add build script
2023-10-10 18:07:06 +10:00
src forbid unsafe code 2023-10-10 03:05:22 +10:00
.dockerignore dockerize 2023-10-10 03:05:22 +10:00
.gitignore add .DS_Store to gitignore 2023-10-10 03:05:22 +10:00
Cargo.lock ctrl c handler (a.k.a. docker shutdown) 2023-10-10 03:05:22 +10:00
Cargo.toml ctrl c handler (a.k.a. docker shutdown) 2023-10-10 03:05:22 +10:00
Dockerfile dockerize 2023-10-10 03:05:22 +10:00
LICENSE.md add license.md 2023-10-10 03:05:21 +10:00
README.md grammar 2023-10-10 03:06:18 +10:00
build_all.sh add build script 2023-10-10 18:07:06 +10:00

README.md

miniQR

miniQR is a micro HTTP service that generates QR codes on the fly.

This server is very small (~1MB docker image) and portable since it runs anywhere Rust can compile for.

Building a docker image

Just use the dockerfile provided in the root of the project.

API Docs

Let's say you want a QR with this text in it: fkpt.

To get this QR, you will need to send a GET request to http://miniqr_instance/fkpt. That's it.

Upscaling the QR image

Since the QR image that is provided is ridiculously small, you will need to upscale it using your platform's GUI toolkit.

And I am guessing that your GUI toolkit is CSS, so here is a snippet for that:

img.qrcode-image {
    width: 400px;
    image-rendering: pixelated; /* This line "unblurs" the qr code */

    padding: 60px;
    background: white;
}
<img src='http://miniqr/aaa' class='qrcode-image'>