Category: Express

Express JavaScript Node.js

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

This entry is part 11 of 11 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 […]

Express JavaScript

TypeScript Express tutorial #10. Testing Express applications

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

An essential part of developing a fully functional software is testing. In this article, we focus on making our application more testable and implementing unit and integration tests using Jest and a library called SuperTest. This part of the TypeScript Express testing tutorial needs some basic understanding of tests and the knowledge of tools like […]

Express JavaScript

TypeScript Express tutorial #8. Types of relationships with Postgres and TypeORM

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

Today we continue using Postgres with Express and Typescript. Relationships are an essential part of working with Postgres, and therefore we cover it today. To handle it we use TypeORM. The code for the tutorial is in the express-typescript repository in the postgres branch. Feel free to give it a star. TypeScript Express Postgres Relationships When […]

Express JavaScript

TypeScript Express tutorial #5. MongoDB relationships between documents

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

Today we dive into MongoDB relationships between documents. To do it we use Mongoose and the populate feature. As always, the code that we cover here is available in the express-typescript repository. You’re welcome to give it a star. MongoDB relationships between documents The fact is that MongoDB is a NoSQL database. It means that it […]

Express JavaScript

TypeScript Express tutorial #4. Registering users and authenticating with JWT

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

Today we cover an essential part of almost every application: registering users and authenticating them. To implement it, we use JSON Web Tokens (JWT). Instead of getting help from libraries like Passport, we build everything from the ground up to get the best understanding of how it works. As always, all of the code is […]