Category: TypeScript

Express JavaScript NestJS TypeScript

API with NestJS #6. Looking into dependency injection and modules

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

NestJS strives to focus on the maintainability and testability of the code. To do so, it implements various mechanisms such as the Dependency Injection. In this article, we inspect how NestJS can resolve dependencies by looking into the output of the TypeScript compiler. We also strive to understand the modular architecture that NestJS is built […]

JavaScript NestJS TypeScript

API with NestJS #3. Authenticating users with bcrypt, Passport, JWT, and cookies

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

Authentication is a crucial part of almost every web application. There are many ways to approach it, and we’ve handled it manually in our TypeScript Express series. This time we look into the passport, which is the most popular Node.js authentication library. We also register users and make their passwords secure by hashing. You can find all […]

Express JavaScript TypeScript

TypeScript Express tutorial #14. Code optimization with Mongoose Lean Queries

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

Mongoose does quite a bit of heavy-lifting for us. It is immensely useful, but not necessary in every case. In this article, we explore the Mongoose documents more and learn what we can achieve by giving up their benefits. Mongoose Document In the second part of this series, we’ve created our first models. They allow […]