SlingAcademy

Node.js

Node.js is a JavaScript runtime that allows for server-side scripting, enabling the development of scalable network applications using a non-blocking, event-driven architecture.

How to Use Passport in Express for Authentication

Updated: Dec 29, 2023

Passport.js is an authentication middleware for Node.js that can be used in Express-based web applications. It is highly flexible and modular, offering a set of strategies to authenticate requests. In this guide, we’ll cover how to......

Fixing req.user Undefined Error in Express and Passport

Updated: Dec 29, 2023

The req.user undefined error typically happens in Express applications using Passport for authentication when Passport is not correctly configured or integrated within the application flow. This property is supposed to hold the current......

Express.js: Passing Variables Through Middleware

Updated: Dec 29, 2023

Middleware functions are a fundamental part of Express.js, allowing developers to perform operations on the request and response objects, and end the request-response cycle or call the next middleware in the stack. One common need is to......

How to Implement Pagination in Express JS

Updated: Dec 29, 2023

Overview In web development, pagination is a crucial feature for handling the display of large datasets. It allows developers to present data in a more organized and user-friendly manner, loading a limited number of items per page.......

Node.js & Express: How to Implement Rate Limiting

Updated: Dec 29, 2023

Rate limiting is a critical feature for both securing and ensuring fair use of APIs. In an Express application, rate limiting can prevent abuse and help services to remain responsive. Below, we explore three different solutions for......

3 Ways to Cache Data in Express.js & Node.js

Updated: Dec 29, 2023

Caching can greatly enhance the performance of a web application by reducing load times and minimizing network traffic between the server and the database. In the context of a Node.js and Express.js application, there are several viable......

Node.js vs Django: Which is better for backend development?

Updated: Dec 29, 2023

Overview Choosing the right framework for backend development can be a daunting task, with several factors such as performance, scalability, ecosystem, and learning curve coming into play. In this article, we compare Node.js and Django......

How to use Async Hooks in Node.js

Updated: Dec 28, 2023

Overview Asynchronous operations are a cornerstone of Node.js, enabling non-blocking I/O operations. However, tracking the lifecycle of asynchronous operations can be challenging. This is where Async Hooks come into play. Async Hooks......

How to Use AWS RDS with Express.js & Node.js

Updated: Dec 28, 2023

Overview In this tutorial, we’ll cover the basics of integrating Amazon Web Services’ Relational Database Service (AWS RDS) with a Node.js application that uses Express.js as its web framework. We’ll begin by setting up an......