Subscribe to Updates
Get the latest creative news from FooBar about art, design and business.
Author: Omkar Pandit
When learning Node.js, one of the best ways to understand how backend development works is to create a web server without using a framework. Node.js provides a built-in module called the HTTP module that allows you to create web servers, receive HTTP requests, and send responses to clients. In this tutorial, we will learn how to use the Node.js HTTP module to create our first web server from scratch. You will learn: What the Node.js HTTP module is How HTTP requests and responses work How to create a basic web server How to handle different URLs How to handle HTTP…
If you are learning Node.js, one of the most important concepts you need to understand is asynchronous programming. Node.js is designed to handle many operations asynchronously. Instead of waiting for one operation to finish before starting another, Node.js can continue doing other work while waiting for tasks such as file operations, database queries, or API requests to complete. To work with asynchronous operations in Node.js, you will commonly encounter three approaches: Callbacks Promises Async/Await In this article, we will understand each approach with simple examples and learn why modern Node.js applications generally prefer Promises and async/await. What is Asynchronous Programming?…
As Node.js applications become larger, putting all of your code inside a single JavaScript file quickly becomes difficult to manage. Node.js solves this problem by allowing you to divide your application into smaller, reusable files called modules. For example, instead of putting user-related code, database code, and server code into one file, you can organize your project like this: my-node-app/ │ ├── app.js ├── user.js ├── database.js └── utils.js Each file can contain its own functionality and can share selected values or functions with other files. In this article, you will learn: What Node.js modules are Why modules are useful…
When working with Node.js, two things you will use almost every day are npm and package.json. If you are new to Node.js, you may have seen commands such as: npm init npm install express npm install npm uninstall express But what exactly is npm? What is package.json? What is package-lock.json? And what is the difference between dependencies and devDependencies? In this beginner-friendly guide, we will answer these questions and learn how npm and package.json work together in a Node.js project. What is npm? npm stands for Node Package Manager. It is the default package manager commonly used with Node.js. npm…
If you are learning backend development with JavaScript, you have probably heard about Node.js and Express.js. Together, they provide a simple and powerful way to build web servers, REST APIs, and backend applications using JavaScript. In this article, we will understand what Node.js and Express.js are, how they work, how to create your first Express server, and how to handle routes and requests. What is Node.js? Node.js is a JavaScript runtime that allows you to execute JavaScript outside the browser. Normally, JavaScript runs inside browsers such as Chrome, Firefox, or Edge. Node.js uses Google’s V8 JavaScript engine to run JavaScript…
Ready to write your first Node.js application? Follow this beginner-friendly guide to set up a Node.js project, understand package.json, and create a simple application.
Node.js allows developers to run JavaScript outside the browser. Learn how Node.js works, what makes it different from traditional server technologies, and why it is popular for backend development.
Variables are one of the first concepts developers encounter when learning JavaScript. Learn how let, const, and var work and when to use each one.
JavaScript is one of the core technologies used to create interactive websites and web applications. Learn what JavaScript is, how it works, and where beginners can start.
