Blog

  • MASTER bun Elysia by Creating a Server – Guide

    Elysia Framework This article will show you how to create a server using the bun Elysia Framework. By the end you will know about the following features: I won’t cover anything generic such as database connections so that we can concentrate on the topic at hand. That said, it’s important to remember that bun is…

    Read more →

  • Full GUIDE: Path Module in Node.js

    1. Introduction The path module in node allows us to work with files and directories. Everything you can do with the command line (or a mouse) can be done with the path module. This blog post aims to be the vest resource out there and includes my experience as a long time node developer. If…

    Read more →

  • Ultimate Guide: Asynchronous vs Synchronous in 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 →

  • fs & Node: The Ultimate Async Guide (fs promises)

    fs (file system) module is a much misunderstood part of node JS, especially the asynchronous versus the synchronous methods. This mega post will cover everything you need to know about fs and more! I include lot’s of architecture guides and potential gotchas (many of which have gotten me in the past). fs stands for file…

    Read more →

  • Definitive Guide to node-cron – Node JS Scheduling

    Introduction node-cron is a Node.js library that allows you to schedule periodic tasks using cron syntax. It allows you to define recurring schedules by specifying minute, hour, day of the month, month, and day of the week using cron-like strings. It’s very easy to use and you can schedule functions or tasks to execute at…

    Read more →

  • Bun Hot Reload Not Working – 3 Fixes

    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 a 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 return…

    Read more →

  • Environment Variables in Bun JS (bun env)

    Bun JS, like all other server side tech, comes with the ability to read environment variables from files. Environment files in your project root directory are read in this particular order: Note that for item 2 bun will first read from variable NODE_ENV, to decide which one to select. You can also manually override which…

    Read more →

  • Express Server with Email Password Auth

    Introduction The FIRST thing you do with any app is to create authentication for it, after all you will have users and they will need accounts! In this article I will show you the basic idea with a standalone one file express server. We will use several popular off the shelf libraries such as express…

    Read more →

  • Simple Express Server in 2 Minutes

    Creating a basic server in Express.js is very straightforward. Express.js is a minimal and flexible Node.js web application framework that provides a robust set of features to develop web and mobile applications. To create a basic server, follow these steps: Your server will start, and you should see the message “Server is running at http://localhost:3000”…

    Read more →