When building a REST API, we must prepare for various cases. At first, everything might run smoothly, but as our API gains traction, we might encounter some issues. We might run into users who begin sending hundreds or thousands of requests per second, pulling data far more often than necessary. This might cause our server […] The post API with NestJS #187. Rate limiting using Throttler appeared first on Marcin Wanago Blog - JavaScript, both frontend and backend.| Marcin Wanago Blog – JavaScript, both frontend and backend
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. […] The post API with NestJS #186. What’s new in Express 5? appeared first on Marcin Wanago Blog - JavaScript, both frontend and backend.| Marcin Wanago Blog – JavaScript, both frontend and backend
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 [crayon-679ae68c520c4302843708-i/] table. database-schema.ts [crayon-679ae68c520c7894633936/] […] The post API with NestJS #185. Operations with PostGIS Polygons in PostgreSQL and Drizzle appeared first on Mar...| Marcin Wanago Blog – JavaScript, both frontend and backend
PostgreSQL, together with PostGIS, allows us to store various types of geographical data. Besides working with simple coordinates, we can also store entire areas in the form of polygons. In this article, we learn how to handle polygons with PostgreSQL and the Drizzle ORM. While Drizzle ORM does not support it out of the box, we […] The post API with NestJS #184. Storing PostGIS Polygons in PostgreSQL with Drizzle ORM appeared first on Marcin Wanago Blog - JavaScript, both frontend and back...| Marcin Wanago Blog – JavaScript, both frontend and backend
We use PostgreSQL with PostGIS and Drizzle ORM to calculate distances and find locations within a radius| Marcin Wanago Blog - JavaScript, both frontend and backend
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 […] The post API with NestJS #182. Storing coordinates in PostgreSQL with Drizzle ORM appeared first on Marcin Wanago Blog - Jav...| Marcin Wanago Blog – JavaScript, both frontend and backend
We split the Drizzle ORM schema for a PostgreSQL database into multiple files in a NestJS project| Marcin Wanago Blog - JavaScript, both frontend and backend
W implement pattern matching search with Drizzle ORM and NestJS. We show how it's different from full-text search.| Marcin Wanago Blog - JavaScript, both frontend and backend
We learn what SQL migrations are and how to use them in a project with the Drizzle ORM and NestJS| Marcin Wanago Blog - JavaScript, both frontend and backend
We explain how to modify entities using PUT and PATCH methods with NestJS and the Drizzle ORM| Marcin Wanago Blog - JavaScript, both frontend and backend
We explore how to store monetary values using PostgreSQL and the Drizzle ORM.| Marcin Wanago Blog - JavaScript, both frontend and backend
We cover the basics of database normalization with examples using the Drizzle ORM to make our database easier to maintain.| Marcin Wanago Blog - JavaScript, both frontend and backend
We explore recursive relationships with PostgreSQL, Drizzle ORM, and NestJS| Marcin Wanago Blog - JavaScript, both frontend and backend
We implement a polymorphic association using Drizzle ORM, PostgreSQL, and NestJS| Marcin Wanago Blog - JavaScript, both frontend and backend
We learn how Universally Unique Identifiers (UUIDs) work and implement them with Drizzle ORM, NestJS, and PostgreSQL| Marcin Wanago Blog - JavaScript, both frontend and backend
We learn how to write unit tests in a NestJS application that uses Drizzle ORM| Marcin Wanago Blog - JavaScript, both frontend and backend
We explore how to use the built-in NestJS logger and combine it with the Drizzle ORM to log SQL queries| Marcin Wanago Blog - JavaScript, both frontend and backend
We explore the fundamentals of SQL indexes and implement examples using PostgreSQL and the Drizzle ORM| Marcin Wanago Blog - JavaScript, both frontend and backend
We implement a full-text search in an app with PostgreSQL, NestJS, and the Drizzle ORM| Marcin Wanago Blog - JavaScript, both frontend and backend
We compare the serial data type and the identity columns using PostgreSQL and the Drizzle ORM| Marcin Wanago Blog - JavaScript, both frontend and backend
We explore the keyset and offset pagination and learn how to implement it with NestJS, PostgreSQL, and Drizzle ORM| Marcin Wanago Blog - JavaScript, both frontend and backend
We go through SQL constraints with PostgreSQL and implement them using Drizzle ORM and NestJS| Marcin Wanago Blog - JavaScript, both frontend and backend
We explain the one-to-one relationship and implement it with Drizzle. We also use the Query API to avoid doing SQL joins manually.| Marcin Wanago Blog - JavaScript, both frontend and backend
We set up NestJS with Drizzle to perform CRUD operations and manage SQL migrations| Marcin Wanago Blog - JavaScript, both frontend and backend
概要 NestJS+AWS SQSのサンプルコード一式を作成しました。関連リンクをはっておきます。 使用ライブラリ nestjs.com www.npmjs.com ソースコード一式 github.com 詳細記事 zenn.dev| 開発覚書はてな版
概要 今回はNestJSでGraphQL を使用したサンプルです。 Code fristとSchema firstの2つのアプローチがあります。今回はCode fristのアプローチで実装していきたいと思います。 GraphQL については以下のページを参照 graphql.org NestJSのGraphQL の説明記事 docs.nestjs.com| 開発覚書はてな版
概要 今回はNestJS上でgRPCクライアントを作成したサンプルです。 gRPCについては以下のページを参照 grpc.io NestJSのgRPCの説明記事 docs.nestjs.com NestJSでgRPC Serverを作成した記事 kakkoyakakko2.hatenablog.com| 開発覚書はてな版
概要 今回はNestJS上でmonorepo機能を使用したサンプルです。 NestJSのmonorepoの説明記事は以下の通りです。 docs.nestjs.com| 開発覚書はてな版
We explore data types in PostgreSQL and Prisma we can use to handle money and learn why we should avoid the float type| Marcin Wanago Blog - JavaScript, both frontend and backend
We use the Helmet library with NestJS to protect against exploits such as Cross-Site Scripting (XSS), clickjacking, and more| Marcin Wanago Blog - JavaScript, both frontend and backend