Sling Academy
Home/Node.js/Page 2

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.

Using ExpressJS and Multer with TypeScript

Updated: Feb 06, 2024
Introduction When building a Node.js application with ExpressJS as the server framework and TypeScript as the language of choice, typing becomes an essential part of the development process. Using TypeScript, a superset of JavaScript,......

NodeJS: Link to static assets (JS, CSS) in Pug templates

Updated: Feb 06, 2024
Overview When building web applications with Node.js and Pug template engine, handling static assets like JavaScript, CSS files, images, and fonts is crucial for rendering web pages. This tutorial provides a comprehensive guide on how......

NodeJS: How to use mixins in Pug templates

Updated: Feb 06, 2024
Introduction Understanding the use of mixins in Pug templates can greatly enhance your web development process, especially when you’re working with Node.js. Mixins in Pug offer a powerful way to create reusable pieces of HTML,......

NodeJS: Displaying images and links in Pug templates

Updated: Feb 06, 2024
Overview Node.js paired with Pug templates offer a powerful combination for web development, enabling you to build dynamic web pages with ease. Pug, formerly known as Jade, is a high-performance template engine heavily influenced by......

ExpressJS + Pug: How to use loops to render array data

Updated: Feb 06, 2024
Introduction In the world of web development, rendering data dynamically is a common challenge. Especially, when working with server-side technologies like ExpressJS in combination with templating engines such as Pug (formerly Jade),......

ExpressJS: Using MORGAN to Log HTTP Requests

Updated: Feb 06, 2024
Introduction Logging HTTP requests is a critical part of any web application’s maintenance and monitoring strategy. It enables developers and system administrators to keep track of what’s happening in the application,......

NodeJS: Using express-fileupload to simply upload files

Updated: Feb 06, 2024
Introduction Node.js, a JavaScript runtime built on Chrome’s V8 JavaScript engine, facilitates the development of highly scalable server-side applications. Coupled with Express.js, a fast, unopinionated, minimalist web framework......

ExpressJS: How to render JSON in Pug templates

Updated: Feb 06, 2024
Introduction When developing web applications using ExpressJS, rendering views can be a pivotal task for sending information to the client side. Pug, formerly known as Jade, stands out as one of the preferred template engines for......

ExpressJS: How to pass variables to Pug templates

Updated: Feb 06, 2024
Introduction ExpressJS, a fast, unopinionated, minimalist web framework for Node.js, provides an efficient way to build server-side applications quickly and effortlessly. One of its strengths is the ability to use templating engines,......

Node.js: Escape dangerous HTML content in Pug templates

Updated: Feb 06, 2024
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). In this guide, we’ll......

ExpressJS: Conditionally Render Content in Pug Templates

Updated: Feb 06, 2024
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 simple and powerful syntax for writing HTML,......

NodeJS: How to include subviews in Pug templates

Updated: Feb 06, 2024
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 primary features include a simple......