Mega Guide: Asynchronous vs Synchronous Javascript

This article aims to be the most comprehensive guide to asynchronous vs synchronous in Javascript. This is a very easy topic to understand once you actually know it. And there’s the problem, every single programmer sucks when trying to explain it! I will initially explain these concepts using the analogy of a shopping trip, which … Read more

Fix Bun Hot Reload Not Working

Is hot reloading not working in your bun.js project? This article gives you 3 potential fixes (from a real developer). First of all there are 2 ways you can hot reload code in your project: The first one, –hot, watches your files for changes and only reloads the content. It DOES NOT restart the bun … Read more

How to Use Files in Bun JS

Bun comes with its own modules for handling file read and writes. Let’s whip up a simple server that allows us to see this in action. Read an HTML File with Bun Initialise a new server and paste in the following code to your index.ts file: This will read an index.html file off disk and … Read more

How to Use Environment Variables in Bun JS

Bun JS, like all other server side tech, comes with the ability to read your environment variables. Environment variable files are read in a particular order though: Note that in item 2 (prod / dev / test) bun will first read the current environment variable -> NODE_ENV, to decide which one to select. You can … Read more