Storing Uploaded Files and Serving Them in ExpressWhere Uploaded Files Are Stored When users upload files to your Node.js application, you must decide where to store them: 1. Local Storage (Server Filesystem) Files saved directly on the server's diskApr 29 · 6 min readjs-learn-fun.hashnode.dev
Sessions vs JWT vs Cookies: Understanding Authentication ApproachesWhat Are Sessions? Sessions are server-side storage mechanisms that maintain user state across multiple requests. How sessions work: User logs in with credentials Server creates a session and storesApr 29 · 6 min readjs-learn-fun.hashnode.dev
Async Code in Node.js: Callbacks and PromisesWhy Async Code Exists in Node.js Node.js is single-threaded and non-blocking. When performing I/O operations like reading files, making HTTP requests, or querying databases, Node.js doesn't wait for tApr 29 · 4 min readjs-learn-fun.hashnode.dev
Synchronous vs Asynchronous JavaScriptThe Coffee Shop Revelation Picture a coffee shop with one barista. Two ways to handle orders: Synchronous (Blocking): Customer 1 orders → Barista makes coffee → Hands it over Customer 2 orders → BarApr 24 · 4 min readjs-learn-fun.hashnode.dev
Async/Await in JavaScript: Writing Cleaner Asynchronous CodeThe Callback Hell Escape Three months into my first job, I inherited this monstrosity: fetchUser(userId, function(user) { fetchPosts(user.id, function(posts) { fetchComments(posts[0].id, functioApr 24 · 4 min readjs-learn-fun.hashnode.dev