What is the Difference Between == vs === in JavaScript?

Whether you are coming from a different programming language like C# or you are a brand new programmer learning about JavaScript, you have probably seen different JavaScript codebases using in some cases double equals (==) and in other cases using triple equals (===). Although they seem similar at first, it is important to understand the … Read more

How to Set up Basic Node.js + Express.js Server with TypeScript

Note: This post is part of Learn How to Use TypeScript With Node.js and Express.js series. Click here to see the first post of the series. Getting Started First things first, we need to create the directory for our application: mkdir express-typescript Time to set up our package.json file where we can define all our … Read more

How to Use Error Handler Middleware with Express.js and TypeScript

Note: This post is part of Learn How to Use TypeScript With Node.js and Express.js series. Click here to see the first post of the series. What is an Error Handler in Express.js? Error handlers in Express.js are in charge of catching and handing errors that happen during runtime. By default, Express.js provides with a … Read more

How to Use Application-Level Middleware with Express.js and TypeScript

Note: This post is part of Learn How to Use TypeScript With Node.js and Express.js series. Click here to see the first post of the series. What Are Application-Level Middleware and Why Do We Need Them? Application-level middleware is a type of middleware that generally runs throughout the whole application. In the case of express.js, … Read more

How to Use Third-Party Middleware with Express.js and TypeScript

Note: This post is part of Learn How to Use TypeScript With Node.js and Express.js series. Click here to see the first post of the series. Third-party middlewares are a good alternative when there is a package available out there offering functionality that our API will need such as allowing client access from different origins … Read more

How to Write Node.js REST Middleware with Express.js with TypeScript

Note: This post is part of Learn How to Use TypeScript With Node.js and Express.js series. Click here to see the first post of the series. What is a Middleware in Node.js/Express.js? A middleware is essential in the development of an application, in our case an API. As the name suggests, middleware is a process … Read more

How to Set up RESTful API Routing using Express.js with TypeScript

Note: This post is part of Learn How to Use TypeScript With Node.js and Express.js series. Click here to see the first post of the series. Create API Endpoint Routes So far our server has only one API endpoint / which we defined in the index.ts returning a Hello World! message. app.get(‘/’, (req: Request, res: … Read more

Learn How to Use TypeScript With Node.js and Express.js

Introduction to a typed RESTful API development experience JavaScript is the language of choice when it comes to frontend development for the web. Advances in web development have led to the rise of multiple libraries and frameworks such as Vue, React, Angular, Svelte, and many others. A long time ago, JavaScript was seen as the … Read more