JavaScript

Beginner’s guide to Web Scraping with Cheerio

The internet is filled with vast amounts of valuable data. However, much of the information isn’t available in a structured format we can download and use. To handle that, we can use web scraping. Web scraping is a process of extracting data from websites that don’t provide it in a structured format out of the […]

NestJS

API with NestJS #186. What’s new in Express 5?

This entry is part 186 of 186 in the API with NestJS

With NestJS 11, the framework now comes with Express 5 by default. While the update is mostly painless, there are some breaking changes to consider. In this article, we go through what new features Express 5 brings to the table and how it affects NestJS. Installing Express 5 Express 4 was released in April 2014. […]

Machine Learning

Machine Learning with TypeScript and TensorFlow: Training your first model

Artificial Intelligence (AI) is a broad and complex field, and getting started can be overwhelming. In this article, we learn how Machine Learning is related to AI and train our first model to determine whether a given piece of text is a spam message. Artificial Intelligence and Machine Learning Artificial Intelligence focuses on developing systems […]

NestJS SQL

API with NestJS #185. Operations with PostGIS Polygons in PostgreSQL and Drizzle

This entry is part 185 of 186 in the API with NestJS

When using PostgreSQL with PostGIS, we can do various operations using polygons. In this article, we learn how to do that both through raw SQL queries and the Drizzle ORM. Storing polygons using the Drizzle ORM To store polygons using the Drizzle ORM, we use a custom data type and the table. database-schema.ts

[…]

NestJS SQL

API with NestJS #183. Distance and radius in PostgreSQL with Drizzle ORM

This entry is part 183 of 186 in the API with NestJS

PostgreSQL provides many options for working with geographical data, especially with the PostGIS extension. In this article, we’ll explore how to calculate the distance between two coordinates and how to identify locations within a specific radius. If you want to check out the basics of storing coordinates in PostgreSQL with the Drizzle ORM, check out […]

NestJS SQL

API with NestJS #182. Storing coordinates in PostgreSQL with Drizzle ORM

This entry is part 182 of 186 in the API with NestJS

Many applications rely on geographical data to calculate distances and track locations. PostgreSQL offers several ways to store geospatial data, each designed with different goals. In this article, we learn how to store coordinates when working with PostgreSQL and the Drizzle ORM. Latitude and longitude A coordinate consists of two numbers that pinpoint a location […]

NestJS SQL

API with NestJS #181. Prepared statements in PostgreSQL with Drizzle ORM

This entry is part 181 of 186 in the API with NestJS

When we execute an SQL query, PostgreSQL follows a process that consists of multiple steps. First, it parses the SQL statement, checking for syntax errors. Next, it analyzes whether the tables and columns used in the query exist. Then, it plans the instructions necessary to achieve the desired result. Finally, it executes the instructions based on […]

NestJS

API with NestJS #180. Organizing Drizzle ORM schema with PostgreSQL

This entry is part 180 of 186 in the API with NestJS

As our application grows, it gets increasingly important to create a file structure that’s easy to maintain. Also, if we care about it from the start, it is easier to achieve. In this article, we learn how to organize the database schema when working with the Drizzle ORM and NestJS. Handling column names When working […]

NestJS

API with NestJS #179. Pattern matching search with Drizzle ORM and PostgreSQL

This entry is part 179 of 186 in the API with NestJS

Searching through text documents is a very common feature in many web applications. In this article, we learn how to implement it using pattern matching using the Drizzle ORM, PostgreSQL, and NestJS. Pattern matching with LIKE and ILIKE With pattern matching, we can determine if a given piece of text matches a particular pattern. To […]