- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Mayank Agarwal has Published 380 Articles
Mayank Agarwal
404 Views
The app.enable() function sets the Boolean setting ‘name’ to ‘true’, where name defines one of the properties from the app settings table. Using the app.set('foo', true) for a Boolean property is same as calling the app.enable('foo') function.Syntaxapp.enable(name)Example 1Create a file with the name "appEnable.js" and copy the following code snippet. ... Read More
Mayank Agarwal
557 Views
The app.disable() method disables the setting name passed in the function. This method sets the setting name to False. We can perform the same function by using the app.set() method too, by passing its value as False.Syntaxapp.disable(name)Example 1Create a file with the name "appDisable.js" and copy the following code snippet. ... Read More
Mayank Agarwal
6K+ Views
The app.delete() method routes all the HTTP DELETE requests to the specified path with the specified callback functions.Syntaxapp.delete(path, callback, [callback])Parameterspath − This is the path for which the middleware function is invoked. A path can be a string, path pattern, a regular expression, or an array of all these.callback − ... Read More
Mayank Agarwal
3K+ Views
The app.all() method can be used for all types of routings of a HTTP request, i.e., for POST, GET, PUT, DELETE, etc., requests that are made to any specific route. It can map app types of requests with the only condition that the route should match.Syntaxapp.path(path, callback, [callback])Parameterspath − This ... Read More
Mayank Agarwal
3K+ Views
Data chunks in Node.js or any other language can be defined as a fragment of data that is sent to all the servers by the client. The servers make a stream of these chunks and form a buffer stream. This buffer stream is then converted into meaningful data.Syntaxrequest.on('eventName', [callback] )ParametersThe ... Read More
Mayank Agarwal
2K+ Views
Node.js is an event-driven JavaScript runtime platform that is built using the Chrome’s V8 JavaScript engine. Node is mainly used for building large-scale applications. In this article, we will see how to run a Java code in Node.js.StepsCheck if Node.js is already installed on your system using the following command ... Read More
Mayank Agarwal
596 Views
The main aim of a Node.js application is to work as a backend technology and serve requests and return response. But we can also pass inputs directly to a Node.js application.We can use readline-sync, a third-party module to accept user inputs in a synchronous manner.Syntaxnpm install readline-syncThis will install the ... Read More
Mayank Agarwal
165 Views
The util.debuglog() method creates a function that can be used to write the desired error/debug messages to stderr. These error messages are written only upon the existence of the NODE_DEBUG environment variable.Syntaxutil.debuglog(section, [callback])ParametersThe parameters are described below −section − This parameter takes the portion of the application for which the ... Read More
Mayank Agarwal
424 Views
The Hash class is one of the many utility classes that is used for creating the hash digests of data. The hash.update() method updates the hash content with the data passed, and the encoding that is passed along with the parameters. If the encoding is not passed and the data ... Read More
Mayank Agarwal
1K+ Views
The Hash class is one of the many utility classes that is used for creating the hash digests of data. The hash.digest() method calculates all the data that needs to be hashed passed inside the hash function and returns them. If an encoding is defined, a string will be returned, ... Read More