Sling Academy
Home/Node.js/Page 4

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.

Weighted Random Selection in Mongoose: Explained with Examples

Updated: Jan 18, 2024
Overview Managing randomness in database queries is often an overlooked feature. However, in the world of modern web applications, the ability to select documents at random especially with certain weights can be a very handy feature......

Express + Handlebars: Rendering a JavaScript array with a loop

Updated: Jan 18, 2024
Introduction Creating dynamic web applications often involves rendering data on the front end that’s stored in the back end. Express, a web application framework for Node.js, together with Handlebars, a powerful templating......

Express + Handlebars: How to conditionally render data

Updated: Jan 18, 2024
Introduction Rendering data conditionally in a web application is a common need. With the combination of Express.js, a back-end web application framework for Node.js, and Handlebars, a templating engine, you can create dynamic views......

Express + Handlebars: How to Include Subviews

Updated: Jan 18, 2024
Introduction When building web applications with Express.js and Handlebars, managing templates effectively is crucial to ensure maintainability and scalability. Including subviews within your views is an architectural best practice......

Express + Handlebars: Escaping Sensitive HTML Output & JavaScript

Updated: Jan 18, 2024
Introduction When building web applications with Express and Handlebars, one important consideration is ensuring that your application is secure against Cross-Site Scripting (XSS) attacks. XSS attacks occur when an attacker manages to......

Express + Handlebars + TypeScript: Tutorial & Examples

Updated: Jan 18, 2024
Introduction Building web applications require a robust set of tools to handle the backend logic, templating for dynamically generating HTML, and a strong typed language for safe development practices. The combination of Express,......

Writing Unit Tests in ExpressJS: A Developers’ Guide

Updated: Jan 18, 2024
Introduction Unit testing is an essential aspect of modern web development. It enables developers to verify the functionality of individual parts of their application independently from each other, improving code reliability and......

Express + Handlebars: How to render a data table from an array

Updated: Jan 18, 2024
Introduction When building web applications, rendering data in a structured and user-friendly manner is a common requirement. In this tutorial, we will learn how to leverage Express.js and Handlebars to render a dynamic data table from......

Express + Handlebars: How to Render JSON Data

Updated: Jan 18, 2024
Introduction When developing web applications with Node.js, Express is often the go-to web framework for its flexibility and ease of use. Handlebars, on the other hand, is a popular templating engine that helps to dynamically create......

Sequelize.js: How to Select Rows Randomly Based on Weights

Updated: Jan 14, 2024
Introduction Selecting rows randomly from a database is a common need, particularly when dealing with features like recommendations, deals, or displaying random profiles. But what if you want to introduce some level of control over the......

How to create a NestJS app in the current directory

Updated: Jan 08, 2024
Introduction NestJS, a framework for building efficient and scalable server-side applications, offers a powerful CLI tool to streamline project setup. This tutorial will guide you on creating a new NestJS application in your current......

Node + Express: How to add Paypal payment

Updated: Jan 08, 2024
Overview Integrating PayPal into a Node.js and Express application enhances commercial functionality allowing for seamless financial transactions. This tutorial methodically guides through the process from setup to successful payment......