File manager - Edit - /home/webtrixia/qr.webtrixia.com/README.md
Back
# QR Code Generator (HTML + Node/Express) **Why Node?** Browsers cannot write files to your disk automatically. This project uses a tiny Express server so your HTML page can **save PNGs into `./qrimages/`** reliably. ## Features - Clean HTML page (`public/index.html`) you open at http://localhost:3000 - Saves every QR code into `qrimages/` with your chosen filename (or timestamp) - Preview of the last generated code and a file list of previous codes - Error-correction level, size (scale), and border (margin) controls ## Quick Start ```bash # 1) Install deps npm install # 2) Start the app npm start # or: node server.js # 3) Open # http://localhost:3000 ``` ## API (for automation) - `POST /api/generate` ```json { "data": "https://example.com", "filename": "my_qr", // optional (no extension) "ec": "M", // L|M|Q|H "size": 10, // scale "border": 4 // margin } ``` Returns: `{ "ok": true, "path": "/qrimages/my_qr.png", "filename": "my_qr.png" }` - `GET /api/list` → returns `["file1.png","file2.png", ...]` ## Project Structure ``` qr-html-generator/ ├─ server.js ├─ package.json ├─ README.md ├─ qrimages/ # all saved PNGs go here └─ public/ ├─ index.html ├─ style.css └─ main.js ``` ## Notes - Works offline — no external CDNs. - Uses the `qrcode` npm package on the server for reliable encoding. - If port 3000 is busy, set PORT env var: `PORT=5050 npm start`.
| ver. 1.4 |
Github
|
.
| PHP 8.2.31 | Generation time: 0 |
proxy
|
phpinfo
|
Settings