add readme

This commit is contained in:
blek 2023-10-10 02:59:55 +10:00
parent eeed3bacbf
commit 8679df5cdc
Signed by: blek
GPG Key ID: 14546221E3595D0C
1 changed files with 34 additions and 0 deletions

34
README.md Normal file
View File

@ -0,0 +1,34 @@
# 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:
```css
img.qrcode-image {
width: 400px;
image-rendering: pixelated; /* This line "unblurs" the qr code */
padding: 60px;
background: white;
}
```
```html
<img src='http://miniqr/aaa' class='qrcode-image'>
```