#Node.js
17 items tagged “Node.js”
Serving Premium Downloads Without Exposing the File's Real Storage URL
TIL how to replace a guessable direct-download link with a permission-checked, time-limited presigned URL, so the object storage path a purchased asset actually lives at is never sent to the client.
Live Poll Results Without WebSockets: Server-Sent Events in a Node.js API
TIL that once vote writes were race-free, the results screen still felt dead until a manual refresh — switching from client polling to Server-Sent Events made results update instantly without the bidirectional complexity WebSockets would have added for a channel that only ever sends in one direction.
Redis-Cached, Server-Clustered Map Pins for a Viewport
Serve map pins for whatever bounding box a user is currently viewing, cached in Redis by the exact viewport, with overlapping pins clustered in SQL before they ever leave the server.
Debugging Problems That Only Appear in Production
TIL that a bug I couldn't reproduce locally turned out to depend on a real difference between environments — request concurrency — that my local setup structurally couldn't produce, no matter how hard I tried to repro it.
Using Docker for Application Deployment: The Boring Win I Underrated
TIL that 'works on my machine' stopped being a real category of bug the day I containerized the API, not because Docker is clever but because it removed an entire class of environment-drift I'd been debugging manually.
Choosing Node.js Hosting for a SaaS: What Actually Mattered vs. What I Thought Would
TIL that I picked Render for a Node.js API expecting the deciding factor to be price, and the thing that actually mattered day to day turned out to be deploy simplicity and predictable cold-start behavior.
Designing a Complete Delivery-Management System as a Solo Developer
TIL that a system spanning a browser extension, a React Native app, an API, and a database only stayed maintainable solo because I treated the API as the one real product and everything else as a thin client of it.
Building Photo Proof of Delivery: Camera to Dashboard, End to End
TIL that the hard part of a photo-proof-of-delivery feature isn't the camera or the upload individually — it's making sure a completed delivery can never end up without its proof attached.
Connecting a Chrome Extension to a Node.js API
TIL that a fetch call from a content script that worked fine in the console failed silently from the actual extension, because content scripts run in an isolated world with their own CORS and CSP rules.
Uploading Images from React Native to a Node.js API
TIL that a multipart upload from React Native needs the file described as an object with uri/name/type, not sent as a raw file:// string — an easy mismatch to miss since it fails silently on some devices.
Designing One API for Both a Web Dashboard and a Mobile App
TIL that a REST API originally shaped around the web dashboard's screens needed real redesign, not just new endpoints, once a React Native app started consuming it too.
Building Authentication Into a Full-Stack App Without Reinventing Sessions Badly
TIL that storing a JWT in localStorage for an app that also needed server-rendered authenticated pages was the wrong call, and cookie-based sessions were less work, not more.
Building REST APIs with Node.js and Express That Don't Fall Apart at Route 40
TIL that an Express API without a consistent response/error shape is fine at 10 routes and a real liability at 40 — the fix was boring middleware, not a framework change.
Archery Garage Mobile App
Cross-platform event management application with location tracking and cloud backend.
Pasal Business Management Platform
Internal business applications developed for inventory management, appointment systems, and daily operational workflows.
Nearby-Places Query: Bounding Box + Haversine in MySQL
A reusable pattern for 'what's near me' search on plain MySQL — a fast bounding-box pre-filter followed by an exact Haversine distance calculation, sorted and paginated in SQL.
Building a Fast, Cached Nearby-Places Search in Node.js (No PostGIS Required)
How I built location search, map-pin clustering, and viewport caching for a mobile app on plain MySQL — bounding-box pre-filtering, Haversine distance in SQL, and Redis-cached viewport queries instead of a dedicated geospatial database.