Category: JavaScript

JavaScript MongoDB NestJS

API with NestJS #43. Introduction to MongoDB

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

So far, in this series, we’ve focused on working with SQL and the Postgres database. While PostgreSQL is an excellent choice, it is worth checking out the alternatives. In this article, we learn about how MongoDB works and how it differs from SQL databases. We also create a simple application with MongoDB and NestJS. You […]

JavaScript SQL

Defining constraints with PostgreSQL and TypeORM

An important part of designing a database is controlling the data we store inside. The most fundamental way of doing that is defining the types for our columns. With that, we can make sure that a particular column holds only text, for example. In this article, we use constraints to have even more control of […]

JavaScript NestJS TypeScript

API with NestJS #42. Authenticating users with Google

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

Authenticating users with emails and passwords is a valid and common approach. However, a convenient alternative is to shift this responsibility to a third party. In this article, we look into adding Google authentication to a NestJS project. We can achieve the above because Google uses the OAuth (Open Authorization) framework. With it, Google users […]

JavaScript NestJS TypeScript

API with NestJS #38. Setting up recurring payments via subscriptions with Stripe

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

In this series, we’ve implemented a few different ways of charging our users using Stripe. So far, all of those cases have included single payments. With Stripe, we can also set up recurring payments using subscriptions. Recurring payments are a popular approach nowadays in many businesses. The users save a credit card and get billed […]

JavaScript NestJS TypeScript

API with NestJS #36. Introduction to Stripe with React

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

Nowadays, a lot of web applications accept online payments. Although this is not straightforward to implement, there are some ready-to-use solutions that we can take advantage of. In this article, we look into Stripe. It serves as a payment processing platform that does the heavy lifting for us. To implement it, we use NestJS and […]