node js

What is Events and EventEmitter in Node.js

Let’s discuss some of the core concepts of Node.js. It is a very short post, but it is very important, if you want to play around with Node.js. It will give you a fair amount of idea how the activity is raised and handled by this fascinating coding language. Let’s jump into the topic. Any kind of activity or action taking place in the computer world are called an event. Some of the examples of the event are like the…

0
Read More
Node callback

What is Callback in Node.js?

A lot of people get confused with the callback concepts. Here is the small topic to make you understand about the callback and uses Node world. It is very simple. Due to this feature, Node.js has captured the market so fast. Let’s discuss. In Synchronous programs, the code executes line by line. After finishing the execution of the current line, then moves to the next line. If any line contains a method which takes time to execute (it might be I/O…

1
Read More

FTP deployment to or update a website using Gulp

This post is about getting familiar with the few of the Gulp operations and FTP deployment to a web server using it. As a developer, we have some challenges to manage the process of development and deployment to a different server. There are few of the techniques in Gulp, which can handle your hectic tasks pretty easily and make our life easy in the developments. When we try to develop the new application or update a legacy application, we need…

0
Read More

Chat application using Node.js

Some point in time, while using social platforms we think how this chat window works. It is pretty simple. Here is sample demo application which will show how the chat window works in Node.js. We will be using the socket.io module for communication between chat windows. You can read about the ‘socket.io’ from https://socket.io/ .   Node.js: It should be installed. Express js: As it is a web application we will require the express module. if you want to read…

0
Read More

How to execute jar file using node js child_process

Many of the situation we need to interact with the other programs. Here is a small demo on how to invoke or execute the jar. In Node js, the “child_process” is the module which will do the needful. Through chlid_process, we can execute OS command. Here have used one java program which takes input from the command line and prints the value which is in command line execution. Below is the java program we have used. We will create an…

2
Read More
mysql-db

Insert multiple/bulk records into mysql DB using node.js

Some cases we get requirements for bulk data insertion to MySQL database. It is a simple process. In this tutorial, we will learn about how to handle multiple rows or arrays of data insertion. Below are the steps to guide archive the target.   Node Js: It should be installed in your system. Below are the processes to set up the project, 1. Create project folder(here it is “mysql-bulkinsert-opration”) 2. Navigate to the folder using the command line (cmd)

4
Read More
log-error

Design custom logger for node js appilication

When designing a web application, we require some information need to be captured. It may be for future reference and analysis to find the root cause of some issue. Designing the Logging module intelligently will help these activities in future. Here we will talk about simple custom logging technique, which you can use and customize as per your requirement of logging. Node Js: It should be installed in your system. express-generator: You need to install express-generator, this will help you…

0
Read More
commadline-image-banner

How to read command line arguments in node js

When we are designing any generalized program, in some cases we need to pass data from the command line. A simple example may be a calculator, which takes input from the command line and prints the output in the console. Reading a command line data is a basic and simple task in Node.js. When we run the program, all the arguments received from the command line is set to “process.argv” property. Process is a global object. If you want to…

0
Read More