NodeJS: Declaring types when using dotenv with TypeScript
Introduction Combining Node.js with TypeScript provides a robust environment for building scalable and maintainable applications. However, working with environment variables in such a type-safe environment can be a…
Using ExpressJS and Multer with TypeScript
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….
NodeJS: Link to static assets (JS, CSS) in Pug templates
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…
NodeJS: How to use mixins in Pug templates
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…
NodeJS: Displaying images and links in Pug templates
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…
ExpressJS + Pug: How to use loops to render array data
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…
ExpressJS: Using MORGAN to Log HTTP Requests
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…
NodeJS: Using express-fileupload to simply upload files
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
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…
ExpressJS: How to pass variables to Pug templates
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…