Skip to content

crappyrules/qrcode-site

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QR Code Generator Site

A minimal Python web app that exposes a simple HTML form to generate QR codes using the qrencode CLI tool. The app runs an http.server-based HTTP server on port 8000 and returns a PNG image with the generated QR code.

QR code generator form

Features

  • Simple HTML form at / to submit text
  • POST to /generate to create a QR code
  • Uses qrencode under the hood
  • Packaged in a Docker image with qrencode installed

Running with Docker Compose

Prerequisites

  • Docker
  • Docker Compose v2 (usually available as docker compose)

Start the service

# From the project root
docker compose up --build

This will:

  • Build the image using the provided Dockerfile
  • Start a container named qrcode-app
  • Expose the app on http://localhost:8000

Usage

  1. Open http://localhost:8000 in your browser.
  2. Enter the text you want to encode into the textarea.
  3. Click Generate QR Code.
  4. Your browser will display a PNG image containing the QR code.

Stop the service

docker compose down

Running without Docker

If you prefer to run the app directly on your host:

Prerequisites

  • Python 3.12+ (or compatible)
  • qrencode installed and available in PATH

On Debian/Ubuntu-based systems, you can install qrencode with:

sudo apt-get update && sudo apt-get install -y qrencode

Run the app

python app.py

Then open http://localhost:8000 in your browser.

Project Structure

  • app.py — Python HTTP server exposing the QR code form and /generate endpoint
  • Dockerfile — Builds a minimal image with Python 3.12 and qrencode installed
  • docker-compose.yml — Orchestrates the app service for local development

Notes

  • The app listens on 0.0.0.0:8000 inside the container.
  • The Dockerfile is based on python:3.12-slim and installs qrencode via apt.

About

simple python script that hosts a web page with a text QR encoder

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors