Tag: JavaScript

12 entries found

NGINX njs now supports QuickJS: Goodbye LUA, hello modern JavaScript

NGINX njs now supports QuickJS: Goodbye LUA, hello modern JavaScript

6 min read

Finally: Modern JavaScript in NGINX (and we can forget about LUA)

When I read the NGINX announcement about QuickJS support in njs, I couldn’t help but smile. Finally I can stop struggling with LUA.

As someone who has configured more NGINX servers than I can remember (from my time at Arrakis to now at Carto), I’ve always been annoyed by the limitation of having to use LUA for complex logic in NGINX. It’s not that LUA is bad, but… why learn another language when I already master JavaScript?

Jest: When Failing Fast is the Smart Strategy

Jest: When Failing Fast is the Smart Strategy

3 min read

When working on large projects, it’s common to have test suites that can take several minutes to run. And when one of those tests fails early in the execution, it’s frustrating to wait for all the others to complete just to see the full results.

Jest includes a feature I’ve found very useful in development: the bail option, which allows stopping test execution after a certain number of failures. It’s one of those features that once you know and start using, you don’t understand how you lived without it.

Deno 2.4: The Bundle is Back

Deno 2.4: The Bundle is Back

10 min read

Deno 2.4 has just been released, and I must admit it has pleasantly surprised me. Not only because of the number of new features, but because of one in particular that many of us thought would never return: deno bundle is back. And this time, it’s here to stay.

This release comes packed with improvements ranging from importing text files directly to stable observability with OpenTelemetry. Let’s explore what this release brings us.

Complete Guide to Configuring Path Aliases in Node.js with TypeScript: Goodbye to Infinite '../../../'

Complete Guide to Configuring Path Aliases in Node.js with TypeScript: Goodbye to Infinite '../../../'

6 min read

Are you tired of seeing imports like import Logger from "../../../utils/logger" in your Node.js projects? If you develop applications with complex folder structures, you’ve surely encountered the labyrinth of dots and slashes that relative imports can become. Fortunately, TypeScript offers an elegant solution: Path Aliases.

In this complete guide, you’ll learn to configure path aliases in Node.js projects with TypeScript, forever eliminating those confusing imports and significantly improving the readability and maintainability of your code.

CookieStore API: The Async Future of Cookie Management in JavaScript

CookieStore API: The Async Future of Cookie Management in JavaScript

7 min read

CookieStore API: The Async Future of Cookie Management in JavaScript

For decades, web developers have depended on the old and limited document.cookie interface to handle cookies in the browser. This synchronous API, with its peculiar string syntax, has been a source of frustration and errors. But that’s changing with the arrival of CookieStore API, a modern and asynchronous interface that promises to revolutionize how we interact with cookies.

The Problem with document.cookie

Before diving into CookieStore, let’s recall the headaches document.cookie has caused us:

Sharing Code Between Applications Using Yarn Symlinks: A Simple Alternative to Complex Monorepos

Sharing Code Between Applications Using Yarn Symlinks: A Simple Alternative to Complex Monorepos

8 min read

Have you ever found yourself duplicating utilities, data types, or components across different applications? If you work on multiple projects that need to share common code, you’ve likely faced the dilemma of how to manage this shared code efficiently.

Recently, while exploring different approaches to share code between applications, I stumbled upon an elegant and simple solution that many developers overlook: Yarn symlinks. This technique might be the perfect answer if you’re looking for a lightweight alternative to complex monorepo setups.

One day I'll discover what the comfort zone is, or not

One day I'll discover what the comfort zone is, or not

5 min read

Moments of change, moments of evolution, a constant in my life, with the 25th anniversary of the creation of the web I’ve entered “review” mode and I’m highly perplexed.

I’ve been doing things for the same time (25 years), enjoying, always with the same concept and particularity: Enjoyment and result, but it hasn’t been relevant for a long time (which is also not very relevant).

I’ve realized that the usual thing is to do things within your comfort zone, and I’ve never had one or knew one could exist, hence I’ve touched and done unusual things or perhaps “untimely”, when a certain technology could be in fashion “Buzz” I hadn’t been using it for a long time because it didn’t give me what something else gave me,…