Published in Geek Culture·4 days agoMember-onlyUnderstanding Server-Sent Events With Node.jsIn this article let’s build a simple node.js data streaming endpoint with a technique called server-sent events (SSE). We will see how we could write a simple SSE endpoint without any external libraries (not even Express.js) but only using the core modules of Node.js. We will also understand What SSE…Nodejs6 min read
Jun 19Member-onlyYarn Workspaces — A Primer to Monorepos with Minimal ToolingIn this article, Let’s take a look at a feature of the Yarn package manager called workspaces. We’ll discuss what workspaces are and when they would be useful. We’ll also walk through a use case of developing a design system, which utilizes a monorepo architecture, to demonstrate a practical use…Yarn Workspace8 min read
Published in JavaScript in Plain English·May 24Member-onlyBundle React Apps with esbuild and Bash ScriptIn this short and practical article, let’s quickly look into an alternative way to build our React applications using a more efficient and modern build tool that depends on ES modules, named esbuild and a hand-coded custom bash script. Background and Intention: The idea and steps presented in this article result from some…React8 min read
Published in Geek Culture·Jan 21Member-onlyJWT Signature Stripping Attack: A Practical PrimerJSON Web Tokens (JWT in short and pronounced as jot) is used in almost every modern web application these days. It is also a common tool used in token-based authentication implementations. (Whether it is the right tool for this purpose is a different topic and requires an article on its…Jwt Token6 min read
Published in Geek Culture·Aug 28, 2021Member-onlyScaling Node.js Applications With PM2 ClustersIn this article, let’s have a look at how we could easily scale our Node applications to handle increased traffic loads using PM2 and clusters without the need to modify our existing application code. PM2: A Brief Primer: PM2 is a runtime process management and monitoring tool with a built-in load balancer for Node.js…Nodejs5 min read
Published in Nerd For Tech·Jun 21, 2021Member-onlyA Practical Introduction to Advanced Usage of TypeScript GenericsIn a static-typed language like TypeScript, generics are a way to improve code reusability by introducing a controlled degree of type leniency. …Typescript3 min read
Published in JavaScript in Plain English·May 8, 2021Member-onlyContinuously Deploy Static Pages with Github Actions & gh-pagesIn this beginner-friendly, short and hands-on article, let’s look at how we could easily set up a continuous deployment pipeline to build and deploy our static site to gh-pages, using Github Actions. Step 1. Create a folder & Initialize package.json and git We could use the mkdir command to create our folder. It could be something like the following: mkdir…Github5 min read
Published in Nerd For Tech·Jan 21, 2021Member-onlyWhat is Idempotency in REST APIs and Why Should You Care?Idem-what now? If you have been working with APIs, chances are that you might have heard some of your peers throw around the word “Idempotence”, leaving you to wonder what they really mean by that word anyway. In this article we’ll look at a detailed answer; so we could learn what this…Api Development4 min read
Published in Nerd For Tech·Dec 31, 2020Member-onlyAPI Security — Broken Object Level Authorization: Attack and DefenseIn the modern web, APIs are like the nervous system. They transmit data to and from one endpoint to another and without them, the web, IoT and everything else that’s awesome about tech would not be so amazing. When something is this crucial, it attracts a lot of attention and…Api Security5 min read
Published in The Startup·Dec 2, 2020Member-onlyPractical Introduction to Strategy Design Pattern Using JavaWhat is Strategy Design Pattern? Strategy design pattern is a behavioural design pattern. It is a tried and tested way of code design that can be used in scenarios where we need to pick up a specific approach (algorithm) from a pool of available related approaches during runtime to achieve something. This design pattern is…Java4 min read