About 948,000 results
Open links in new tab
  1. JavaScript Require – How to Use the require () Function in JS

    Jan 31, 2023 · In this article, you will learn what the require() function does, how you can use it, and some distinct differences between the require and import functions. For a long time, the …

  2. JavaScript Require – How to Use the require () Function in JS

    Aug 28, 2024 · To import a module, you just need to call require() and assign the result: The first example imports a local module file. The second imports the Node.js "fs" core module. You …

  3. What is "require" in JavaScript and NodeJS? - Stack Overflow

    The require() method is used to load and cache JavaScript modules. So, if you want to load a local, relative JavaScript module into a Node.js application, you can simply use the require() …

  4. JavaScript - Require () Function - Online Tutorials Library

    The require () method, a built-in CommonJS module function that Node.js supports, is how you add modules to your project. The reason for this is that by default, Node.js treats JavaScript …

  5. JavaScript Require – A Comprehensive Guide to the require () …

    In this comprehensive guide, I‘ll walk through everything you need to know about require() – from basic syntax to advanced usage and best practices. Whether you‘re new to Node development …

  6. What is 'require' in JavaScript and NodeJS? A Practical Guide with ...

    Nov 8, 2025 · In this guide, we’ll demystify `require`: how it works, why it’s essential, and how to use it in real-world scenarios—including a practical example with a PostgreSQL database. By …

  7. Understanding require vs import in JavaScript: A Practical Guide

    Dec 13, 2024 · Understanding the differences between require and import is essential for any JavaScript developer. While require is a tried-and-true approach for Node.js applications, the …

  8. JavaScript - Require () Function: A Comprehensive Guide

    This blog post will dive deep into the fundamental concepts, usage methods, common practices, and best practices related to the require() function in JavaScript.

  9. Understanding require function (Node.js) - Medium

    Oct 3, 2023 · Understanding require function (Node.js) require is a function that uses CommonJS which is the way that Node.js uses to load a module, when we do require (‘my-file.js’) it …

  10. Require in JavaScript & NodeJS Explained - nulldog.com

    Apr 26, 2024 · Learn the ins and outs of the "require" function in JavaScript and NodeJS, and understand how it's used to import modules and manage dependencies in your projects.