Category: JavaScript

JavaScript Node.js

Introduction to managing a private NPM registry with Verdaccio

An organization often develops more than one project. Since the projects are often part of a more extensive ecosystem, this could lead to duplicating some of the code. To deal with this problem, we can create JavaScript libraries that we can reuse across various projects. The most straightforward way of maintaining packages available in all […]

JavaScript NestJS

API with NestJS #113. Logging with Prisma

This entry is part 113 of 121 in the API with NestJS

Using a debugger with an application running locally on our machine is a great way to troubleshoot. Unfortunately, we can’t do that with a deployed app. To be able to investigate any potential issues, we need to implement a logging functionality. In this article, we use the logger built into NestJS and integrate it with […]

JavaScript NestJS

API with NestJS #112. Serializing the response with Prisma

This entry is part 112 of 121 in the API with NestJS

When fetching data from the database, we do not always want to present it to the user in the original form. When working with NestJS, the most popular way of modifying the response is with the library. However, using the above library with Prisma requires a bit of work. In this article, we provide […]

Express JavaScript NestJS

API with NestJS #89. Replacing Express with Fastify

This entry is part 89 of 121 in the API with NestJS

By default, NestJS uses Express under the hood. Moreover, since Express is very popular, NestJS can choose from a broad set of compatible third-party solutions. A significant advantage of NestJS is that it is framework-independent. Instead of using Express, we can use an adapter using another library with a similar request/response pipeline. The most popular […]

JavaScript NestJS SQL

API with NestJS #88. Testing a project with raw SQL using integration tests

This entry is part 88 of 121 in the API with NestJS

Covering our project with tests can help us ensure that our application works as expected and is reliable. While unit tests play a significant role, they are not enough. Therefore, this article explains the significance of integration tests and implements them in a NestJS project that uses raw SQL queries. The significance of integration tests […]

JavaScript NestJS SQL

API with NestJS #85. Defining constraints with raw SQL

This entry is part 85 of 121 in the API with NestJS

Having significant control over the data we store in our database is crucial. One of the ways to do that is to choose suitable column types. We can also use constraints to go further and reject the data that does not match our guidelines. By doing that, we can have an additional layer of security […]

JavaScript React TypeScript

Introduction to Gatsby with TypeScript and GitHub Pages

When a browser opens a regular React application, it receives HTML with an empty div and a JavaScript file.

When the browser receives the above response, it runs the JavaScript file that modifies the DOM tree and creates a web page. This is a good solution for many applications but has a few drawbacks. […]