Category: Node.js

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 […]

Node.js SQL

Serial type versus identity columns in PostgreSQL and TypeORM

So far on this blog, we’ve used the serial type to define autoincrementing ids for our tables. However, TypeORM started fully supporting identity columns very recently. Since PostgreSQL official recommends using them, it is a good moment to go through both approaches and compare them. Serial type The serial data type allows us to generate unique […]

JavaScript Node.js SQL

Time intervals with PostgreSQL and TypeORM

In the previous article, we’ve looked into various ways to store the date and time with PostgreSQL and TypeORM. Postgres can also manage intervals. With them, we can store a period of time. Ways to store and display intervals in PostgreSQL There are various ways we can input and view interval values. By default, PostgresSQL represents […]

Express JavaScript Node.js

TypeScript Express tutorial #12. Creating a CI/CD pipeline with Travis and Heroku

This entry is part 12 of 15 in the TypeScript Express tutorial

Once our application is up and running, we want to deploy it. In this article, we explain what Continous Integration (CI) and Continuous Delivery (CD) is. We use Travis and Heroku as an example, but the knowledge can be used with other tools also. Both Travis and Heroku can be tried out for free. Continuous […]

Express JavaScript Node.js

TypeScript Express tutorial #11. Node.js Two-Factor Authentication

This entry is part 11 of 15 in the TypeScript Express tutorial

Identity theft is a serious issue nowadays. With so many accidents happening on the web, it is a great time to learn about providing an additional layer of security for our users. In this article, we go through the principles and implementation of Node.js Two-Factor Authentication (2FA). We do that by using Google Authenticator and […]

JavaScript Node.js

Node.js TypeScript #15. Benefits of the HTTP/2 protocol

This entry is part 12 of 15 in the Node.js TypeScript

The HTTP protocol, having been introduced in 1991, is almost 30 years old. It went through quite a journey since the first documented version, later called 0.9. In this article, we briefly go through the history of the development of the HTTP protocol and focus on what HTTP/2 brings and how we can benefit from […]

JavaScript Node.js

Using Push Notifications with Service Workers and Node.js

In this article, we cover another feature that we can implement with the help of Service Workers – Push Notifications. They come in handy if we need a fast channel of communicating with our users. We not only learn how to implement them in terms of code, but we also explore the User Experience side […]

JavaScript Node.js

Node.js TypeScript #14. Measuring processes & worker threads with Performance Hooks

This entry is part 15 of 15 in the Node.js TypeScript

When writing Node.js code, we can approach tasks in many ways. While all of them might work fine, some perform better than others, and as developers, we should strive to make both easily readable and fast applications. In this article, we learn how to measure the performance of our code using Performance Hooks, also called […]