Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tharunoptimus/qrcode-generator-api
Generate QR code like a pro with this Express API 👩💻
https://github.com/tharunoptimus/qrcode-generator-api
express qrcode
Last synced: 16 days ago
JSON representation
Generate QR code like a pro with this Express API 👩💻
- Host: GitHub
- URL: https://github.com/tharunoptimus/qrcode-generator-api
- Owner: tharunoptimus
- Created: 2021-08-08T07:04:53.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-08-08T07:52:02.000Z (over 3 years ago)
- Last Synced: 2024-11-11T08:47:49.477Z (3 months ago)
- Topics: express, qrcode
- Language: JavaScript
- Homepage: https://qr.up.railway.app/?data=meow
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# QR Code Generator
## Install
`npm install` to install dependencies.
## Run
`npm start` to start the server.
## Info
- Similar to Google Charts API for QR code
- Gets the Parameter for the string (`data`) and size (`size`) from the URL.
- Uses [qrcode](https://www.npmjs.com/package/qrcode) for the QR code generation.
- Creates a Buffer with the QR code data url.
- Sends the Buffer image with `res.writeHead()`## Example
- In the development server load this URL to get the QR Code
[`localhost:3003/?data=meowman&size=100`](localhost:3003/?data=meowman&size=100)
- The Query Parameters
- `data`: The string to generate
- `size`: The size of the QR code (optional - default is 200px)
- `ec`: The error correction level (optional - default is 'L')## Enjoy!