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.

Node.js: Escape dangerous HTML content in Pug templates

Updated: February 6, 2024 By: Guest Contributor

Introduction When developing web applications with Node.js and Pug as the templating engine, it’s crucial to consider security measures to prevent possible attacks, such as Cross-Site Scripting (XSS)….

ExpressJS: Conditionally Render Content in Pug Templates

Updated: February 6, 2024 By: Guest Contributor

Introduction to Pug Pug, formerly known as Jade, is a high-performance template engine heavily influenced by Haml and implemented with JavaScript for Node.js and browsers. It provides a…

NodeJS: How to include subviews in Pug templates

Updated: February 6, 2024 By: Guest Contributor

Introduction Pug is a high-performance template engine heavily influenced by Haml and implemented with JavaScript for Node.js and browsers. It facilitates writing cleaner and more readable HTML. Its…

NodeJS + Pug: How to create reusable layouts (header, footer)

Updated: February 6, 2024 By: Guest Contributor

Overview When building web applications, maintaining a consistent look and feel across your pages is essential. Using NodeJS together with Pug (formerly known as Jade), a high-performance template…

NestJS: Connecting to Different Databases Based on Routes

Updated: February 6, 2024 By: Guest Contributor

Overview In modern web development, the need to interact with multiple databases within a single application is increasingly common. This requirement arises from various business needs, including separating…

Sequelize.js: How to Drop FOREIGN KEY Constraints

Updated: February 6, 2024 By: Guest Contributor

Introduction Sequelize is a powerful library for Node.js applications that makes it easier to manage SQL databases. It enables developers to work with data in a more high-level,…

How to read a QR code image in Node.js

Updated: February 5, 2024 By: Guest Contributor

Introduction QR codes have become a ubiquitous part of our digital experience, enabling quick access to information, websites, and much more. For developers looking to integrate QR code…

How to generate QR codes in Node.js

Updated: February 5, 2024 By: Guest Contributor

Introduction to QR Codes QR codes (Quick Response codes) are two-dimensional barcodes that can store a significant amount of data, which can be scanned using smartphones and other…

How to create a fixed-size collection with MongooseJS

Updated: February 1, 2024 By: Guest Contributor

Introduction Dealing with fast-growing databases can present significant challenges, particularly when you want to maintain a fixed-size collection where old data is seamlessly removed to make room for…

How to install NPM modules globally without ‘sudo’ (3 ways)

Updated: January 28, 2024 By: Guest Contributor

Introduction Node Package Manager (NPM) is an essential tool for JavaScript developers as it serves as the default package manager for the JavaScript runtime environment Node.js. By default,…

1 2 3 4 5 56