JavaScript

Comparing ECMAScript Modules and CommonJS

JavaScript started as a simple language used to make static websites more dynamic and interactive. However, projects written in JavaScript began getting increasingly complex a long time ago. Because of that, it quickly became apparent that we needed a way to break the code into smaller, manageable pieces. Throughout the years, people have had many […]

JavaScript

Monorepos with Yarn Workspaces

With monorepos, we keep the code for different projects together in one big repository. This makes sharing and reusing the code across multiple projects easier and can simplify dependency management. Each project has its own directory, scripts, and dependencies. We can use Yarn workspaces designed with monorepos in mind to handle all that. In this […]

JavaScript

Understanding native JavaScript modules

It’s been a long time since the JavaScript projects began to grow in complexity. Because of that, breaking the code into manageable pieces became essential. In the history of JavaScript development, we went through many different approaches to splitting our code into modules. Good examples include solutions such as CommonJS, which is used in NodeJS. […]

NestJS

API with NestJS #145. Securing applications with Helmet

This entry is part 145 of 187 in the API with NestJS

Ensuring that our application is secure is one of the most important things we must do as developers. One of the ways to protect our application from well-known vulnerabilities is to set appropriate response headers. There are quite a lot of different security-related response headers to consider. Fortunately, the helmet library can set them for […]

NestJS

API with NestJS #144. Creating CLI applications with the Nest Commander

This entry is part 144 of 187 in the API with NestJS

Command Line Applications are very useful for developers. We can interact with them by executing specific commands in the terminal, giving us much control and flexibility. You probably already interact with various CLI applications, such as Git or NPM. Interestingly, we can also use NestJS to create a Command Line Interface (CLI) application. In this […]

NestJS

API with NestJS #142. A video chat with WebRTC and React

This entry is part 142 of 187 in the API with NestJS

Let’s say two people want to video chat using our app. One solution would be for the first person to stream their camera feed to our server. Then, our application would pass this data to the other caller. Unfortunately, our application acting as a middleman could introduce a significant lag, especially if our server is […]