Since v22.6.0, Node.js has experimental support for some TypeScript syntax via “type stripping.” You can write code that’s valid TypeScript directly in Node.js without needing to transpile it first.
Today, we will do a small demo and explain how “type stripping” works, allowing users to run .ts files directly with the Node.js command, without requiring a tsconfig file or build step. Scripts for demos are available at my Github Repo
NGINX is a popular web server often used to host Node.js applications in production. It provides features like load balancing, proxying, reverse proxy, and static file serving out of the box.
Serving Web Apps with NGINX 🔗Today, we will perform a simple exercise using a basic JavaScript backend to demonstrate the load balancing capabilities of the NGINX web server. Alongside the backend server script, we’ll also host a single webpage on NGINX to showcase static file serving.
WebSockets are powerful tools for real-time communication, allowing clients and servers to maintain an open connection and exchange data freely. This makes them ideal for building interactive applications like chat systems, real-time collaboration tools, and multiplayer games.
In this blog post, we’ll walk through creating a WebSocket server in Node.js using the ws library. We’ll maintain a queue of connected clients, notify users when new clients join or leave, and ensure every client stays up-to-date with the current lobby status.