Node.js Articles

Page 6 of 22

Node.js vs Java

Deepti S
Deepti S
Updated on 15-May-2023 465 Views

Overview of Node.js vs Java Java has been a long-standing favorite for programmers worldwide, while Node.js is a relatively new JavaScript runtime environment. This article delves into the differences between Node.js and Java and aims to provide a better understanding of both tools and their respective applications. While we may never settle the question of which is ultimately better, gaining insight into these powerful tools can help us make informed decisions about where and when to use them. What Is Node.js? In 2009, Ryan Dahl created Node.js, a cross-platform JavaScript (JS) runtime environment that enables developers to use JavaScript on ...

Read More

How to Configure Socket.IO with Demo-Chat App in Node.js?

Shubham Vora
Shubham Vora
Updated on 04-May-2023 364 Views

Socket.io is a popular JavaScript library that allows us to communicate between the server and the client. We can create an instance of socket.io on the client and server sides and listen to or emit the events from both sides. Also, we can listen to the event emitted from the server on multiple web clients. In real-time, we can use the socket.io library to create chat applications and online games requiring bi-direction communication. For example, if you have observed while playing chess or Ludo, it allows us to talk with our opponent. In this tutorial, we will learn to configure ...

Read More

How to Build Docker Node.js Application?

Aadyaa Srivastava
Aadyaa Srivastava
Updated on 27-Apr-2023 320 Views

Introduction: What is Docker and Why Use it for Node.js? Docker is a containerization platform that lets you package your apps and dependencies into a self-contained environment. This means you can run your application in several environments without worrying about dependencies or setup difficulties. Utilizing Docker with Node.js can bring numerous advantages, particularly during the development and deployment stages of your project. You can use Docker to generate a Docker image of your Node.js application that includes all of the dependencies and configurations needed to run it. This image can then be readily distributed to additional developers or deployed ...

Read More

Comparison between Go & Node.js

Sabid Ansari
Sabid Ansari
Updated on 07-Apr-2023 301 Views

When it comes to choosing the right language for a project, developers often compare different programming languages to find the best fit. In this article, we will compare two popular programming languages, Go and Node.js, to help you make an informed decision. Comparison between Go & Node.js Go and Node.js are both open-source, server-side programming languages. Go was developed by Google in 2009, while Node.js was developed by Ryan Dahl in 2009. Both languages have gained a lot of popularity in recent years, and they are often used for similar tasks, such as building web applications and APIs. ...

Read More

Node.js Alternatives

Shirjeel Yunus
Shirjeel Yunus
Updated on 05-Apr-2023 377 Views

What is Node.js? Ryan Dahl developed Node.js in 2009 and its current version is v0.10.36. Node.js is a server-side platform which is developed on the JavaScript Engine of Google Chrome. This is a cross-platform runtime environment which can be used to develop server-side and networking applications. JavaScript is used to create Node.js applications which can be executed on Node.js environment installed on various platforms like OSX, Linux, and Windows. Cost of Node.js Node.js is an open-source library and can be used for free. There are many hosting platforms that utilize Node.js. Some of them provide paid services. Why Node.js Alternatives? ...

Read More

Explain clearTimeout() function in Node.js

Prabhdeep Singh
Prabhdeep Singh
Updated on 17-Mar-2023 552 Views

There is a timer module in node.js that is used to schedule timers and carry out specific functions at a later time. In Node.js the JavaScript function clearTimeout() is used to halt the execution of the setTimeout() function by using the timeoutID returned by a specific setTimeout() function call. This function does nothing if the timeoutID didn't match for any prior calls or if an invalid value is given. The setTimeout() JavaScript function executes the specified code after the user-specified amount of time or delay, and it returns an ID, which is a positive integer commonly referred to as the ...

Read More

How to share code between Node.js and the browser?

Rushi Javiya
Rushi Javiya
Updated on 07-Mar-2023 1K+ Views

Sharing code between the backend and front end of a full-stack application can be a challenging task. However, it's essential for building maintainable and scalable applications. By sharing code, we can avoid code duplication, reduce development time, and maintain consistency across our applications. In this tutorial, we'll explore different techniques for sharing code between Node.js and the browser and learn how to choose the best approach for our project. Techniques for Sharing Code Between Node.js and the Browser Users can follow the approaches below to share code between node.js and the browser − CommonJS Modules CommonJS modules are ...

Read More

How to sorting an array without using loops in Node.js?

Shubham Vora
Shubham Vora
Updated on 06-Mar-2023 1K+ Views

In Node.js, a built-in sort() method is available to sort an array without a headache. However, as a beginner to learn how the sort() method works internally, users should learn various sorting algorithms. In this tutorial, we will learn a different algorithm to sort an array without using loops in NodeJS. Use the setInterval() method The setInterval() method allows us to invoke any particular function after each interval. Also, we can store the id of the setInterval() method in any variable and use it later to clear the interval. So, we can call a callback function in the ...

Read More

How to solve “Process out of Memory Exception” in Node.js?

Shubham Vora
Shubham Vora
Updated on 28-Feb-2023 4K+ Views

"Process out of Memory" is an error that occurs when a Node.js program tries to use more memory than the system has available. This can happen when the program grows too big or runs for too long and can cause the system to stop working properly. To prevent this error, we may need to limit the amount of memory our program uses or find ways to optimize its performance. In this tutorial, we will learn about the "Process out of Memory Exception" in Node.js, what causes it to occur, and how to solve it. We will also explore some ...

Read More

How to calculate local time in Node.js?

AmitDiwan
AmitDiwan
Updated on 16-Feb-2023 6K+ Views

In this article, you will understand how to calculate local time in Node.js. The Date object works with dates and times. Date objects are created with new Date(). JavaScript will use the browser's time zone and display a date as a full text string. Node.js is an open-source and cross-platform JavaScript runtime environment.As an asynchronous event-driven JavaScript runtime, Node.js is designed to build scalable network applications. Example 1 In this example, we use the toDateString and toTimeString function const dateTimeObject = new Date(); console.log("A date-time object is created") console.log(`Date: ${dateTimeObject.toDateString()}`); console.log(`Time: ${dateTimeObject.toTimeString()}`); Output A date-time object is created ...

Read More
Showing 51–60 of 212 articles
« Prev 1 4 5 6 7 8 22 Next »
Advertisements