devto 2026-09-22 원문 보기 ↗
Every developer encounters this awkward friction almost every week:
You have an APK file, a configuration snippet, an invoice PDF, or a test video on your development machine, and you need to send it to your phone right now.
What do most of us do?
All these methods upload your local files to external third-party cloud servers just to travel 30 centimeters across your desk over the same local Wi-Fi router.
To eliminate this friction, I built QuickShare-QR — a zero-setup Node.js CLI tool that spins up a secure, ephemeral local HTTP server and prints a scannable ASCII QR code directly into your terminal.
[Developer Machine] [Smartphone / Tablet]
│ │
$ npx quickshare-qr test.pdf │
│ │
├── 1. Discovers Local LAN IP (192.168.1.X) │
├── 2. Spins up Ephemeral HTTP Server on random port │
└── 3. Renders ANSI QR Code directly in Terminal │
│ │
└────────── [Scan with Camera] ─────────┤
│
Direct LAN Streaming Download
(No app installation needed!)
The transfer happens 100% peer-to-peer over your local Wi-Fi / LAN network. Files never leave your local router. Speed is limited only by your local Wi-Fi bandwidth (often 30–80 MB/s).
Because QuickShare-QR serves standard HTTP with proper Content-Disposition headers, the receiver does not need to install any app.
Just point the phone's default camera at the terminal QR code, tap the notification, and the browser immediately begins downloading.
The CLI streams files chunk-by-chunk using Node.js read streams:
import http from 'node:http';
import fs from 'node:fs';
const server = http.createServer((req, res) => {
res.writeHead(200, {
'Content-Type': 'application/octet-stream',
'Content-Disposition': `attachment; filename="${fileName}"`,
'Content-Length': fileStat.size,
});
const fileStream = fs.createReadStream(filePath);
fileStream.pipe(res);
fileStream.on('end', () => {
console.log('Transfer complete! Shutting down server...');
setTimeout(() => server.close(), 1000);
});
});
As soon as the file finishes downloading, the server gracefully shuts down and releases the port.
Allowing devices on the local network to fetch files requires strict security boundaries:
../) by strictly binding the HTTP route to the single selected target file.You don't need to install anything permanently:
# Share any file instantly over LAN
npx quickshare-qr ./my-presentation.pdf
# Share an archive or photo
npx quickshare-qr ./assets.zip
Point your phone's camera at your terminal screen, and the transfer starts immediately!
QuickShare-QR is open source under the MIT license.
🔗 GitHub Repository: github.com/mahdyarmonfared/quickshare-qr
I'd love your feedback:
Feel free to open an issue or drop a star ⭐ on GitHub!